Skip to content

Commit 01a674b

Browse files
committed
fix idb result src
1 parent 28c6a5c commit 01a674b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Client/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ let isInitialized = false;
318318
console.error("GenFanad client not found in IDB. GenLite will not work.");
319319
} else {
320320
store.openCursor(null, 'prev').onsuccess = (e: any) => {
321-
let genfanadJS = e.target.result.src;
321+
let genfanadJS = e.target.result.value.src;
322322
genfanadJS = genfanadJS.replace(/window\.innerWidth/g, "document.body.clientWidth");
323323
genfanadJS = genfanadJS.replace(/background-image: linear-gradient\(var\(--yellow-3\), var\(--yellow-3\)\);/g, "");
324324
document.cachedGenfanadSource = genfanadJS;

src/Loader/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ function getGenliteFromIDB(callback) {
6161
callback(null);
6262
} else {
6363
store.openCursor(null, 'prev').onsuccess = (e: any) => {
64-
const cursor = e.target.result;
65-
callback(cursor.value);
64+
callback(e.target.result.value);
6665
};
6766
}
6867
};
@@ -100,8 +99,7 @@ function getGenfanadFromIDB(callback) {
10099
callback(null);
101100
} else {
102101
store.openCursor(null, 'prev').onsuccess = (e: any) => {
103-
const cursor = e.target.result;
104-
callback(cursor.value);
102+
callback(e.target.result.value);
105103
};
106104
}
107105
};

0 commit comments

Comments
 (0)