1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Change a self.X JS reference to X to account for a symbol resolution discrepancy between vanilla JS and ES6 modules, as explained in [forum:801d8f77e5115141|forum post 801d8f77e5115141].

FossilOrigin-Name: 0590de4da1103d842b9f9f25bcd2e69223b2ea067ae2f320f58dd3763218b39d
This commit is contained in:
stephan
2022-11-16 21:52:29 +00:00
parent 1d4f1cf426
commit a872466c8e
3 changed files with 11 additions and 8 deletions

View File

@ -15,7 +15,10 @@
impls which Emscripten installs at some point in the file above
this.
*/
const originalInit = self.sqlite3InitModule;
const originalInit =
/*Maintenance reminde: DO NOT use `self.` here. It's correct
for non-ES6 Module cases but wrong for ES6 modules because those
resolve this symbol differently! */ sqlite3InitModule;
if(!originalInit){
throw new Error("Expecting self.sqlite3InitModule to be defined by the Emscripten build.");
}