Skip to content

Commit c6176b8

Browse files
authored
Merge pull request #123 from codeitcodes/dev
Dev
2 parents ec9827d + 9af6bd3 commit c6176b8

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

utils.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -191,19 +191,25 @@ window.addEventListener('offline', () => { isOffline = true });
191191

192192
let isPersistStorage = false;
193193

194-
if (navigator.storage && navigator.storage.persist) {
194+
async function checkPersistStorage() {
195195

196-
isPersistStorage = await navigator.storage.persisted();
197-
198-
if (!isPersistStorage) {
199-
200-
// request persistent storage
201-
isPersistStorage = await navigator.storage.persist();
202-
196+
if (navigator.storage && navigator.storage.persist) {
197+
198+
isPersistStorage = await navigator.storage.persisted();
199+
200+
if (!isPersistStorage) {
201+
202+
// request persistent storage
203+
isPersistStorage = await navigator.storage.persist();
204+
205+
}
206+
203207
}
204208

205209
}
206210

211+
checkPersistStorage();
212+
207213

208214
// base64 encode/decode
209215

worker/client-channel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
// update worker name when updating worker
7-
const WORKER_NAME = 'codeit-worker-v492';
7+
const WORKER_NAME = 'codeit-worker-v493';
88

99

1010
// internal paths

0 commit comments

Comments
 (0)