@livestore/wa-sqlite 1.0.1-dev.23 → 1.0.1-dev.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sqlite-api.js +6 -1
package/package.json
CHANGED
package/src/sqlite-api.js
CHANGED
|
@@ -936,9 +936,14 @@ export function Factory(Module) {
|
|
|
936
936
|
};
|
|
937
937
|
})();
|
|
938
938
|
|
|
939
|
+
const registeredVfs = new Set();
|
|
940
|
+
|
|
939
941
|
sqlite3.vfs_register = function(vfs, makeDefault) {
|
|
942
|
+
if (registeredVfs.has(vfs)) return
|
|
940
943
|
const result = Module.vfs_register(vfs, makeDefault);
|
|
941
|
-
|
|
944
|
+
const res = check('sqlite3_vfs_register', result);
|
|
945
|
+
registeredVfs.add(vfs);
|
|
946
|
+
return res
|
|
942
947
|
};
|
|
943
948
|
|
|
944
949
|
function check(fname, result, db = null, allowed = [SQLite.SQLITE_OK]) {
|