fix(core): update
This commit is contained in:
@@ -24,8 +24,14 @@ export class WebStore<T = any> {
|
||||
this.initCalled = true;
|
||||
|
||||
const smartenv = new plugins.smartenv.Smartenv();
|
||||
if (!smartenv.isBrowser) {
|
||||
if (!smartenv.isBrowser && !globalThis.indexedDB) {
|
||||
console.log('hey');
|
||||
console.log(globalThis.indexedDB);
|
||||
await smartenv.getSafeNodeModule('fake-indexeddb/auto');
|
||||
if (!globalThis.indexedDB) {
|
||||
const mod = await smartenv.getSafeNodeModule('fake-indexeddb');
|
||||
globalThis.indexedDB = new mod.IDBFactory();
|
||||
}
|
||||
}
|
||||
|
||||
this.db = await plugins.idb.openDB(this.options.dbName, 1, {
|
||||
|
||||
Reference in New Issue
Block a user