You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The original example for Promise.all and await can not work functionally together (see MDN for details.).
A new example can be adopted as:
asyncfunctionfetchSQL(){const[SQL,buf]=awaitPromise.all([initSqlJs({locateFile: file=>`https://path/to/your/dist/folder/dist/${file}`}),fetch("/path/to/database.sqlite").then(res=>res.arrayBuffer())]);constdb=newSQL.Database(newUint8Array(buf));// other command as below}fetchSQL();