aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-opfs-async-proxy.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/wasm/api/sqlite3-opfs-async-proxy.js')
-rw-r--r--ext/wasm/api/sqlite3-opfs-async-proxy.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/wasm/api/sqlite3-opfs-async-proxy.js b/ext/wasm/api/sqlite3-opfs-async-proxy.js
index ca5583971..e10d0dd50 100644
--- a/ext/wasm/api/sqlite3-opfs-async-proxy.js
+++ b/ext/wasm/api/sqlite3-opfs-async-proxy.js
@@ -61,7 +61,7 @@ const installAsyncProxy = function(){
}
/**
- Will hold state copied to this object from the syncronous side of
+ Will hold state copied to this object from the synchronous side of
this API.
*/
const state = Object.create(null);
@@ -506,8 +506,7 @@ const installAsyncProxy = function(){
dirHandle: hDir,
fileHandle: hFile,
sabView: state.sabFileBufView,
- readOnly: create
- ? false : (state.sq3Codes.SQLITE_OPEN_READONLY & flags),
+ readOnly: !create && !!(state.sq3Codes.SQLITE_OPEN_READONLY & flags),
deleteOnClose: !!(state.sq3Codes.SQLITE_OPEN_DELETEONCLOSE & flags)
});
fh.releaseImplicitLocks =
@@ -723,7 +722,7 @@ const installAsyncProxy = function(){
https://github.com/tomayac/sqlite-wasm/issues/12
- is reporting that this occassionally, under high loads,
+ is reporting that this occasionally, under high loads,
returns 'ok', which leads to the whichOp being 0 (which
isn't a valid operation ID and leads to an exception,
along with a corresponding ugly console log