Catch error when trying to persist storage

This happens on Firefox Mobile
This commit is contained in:
toasted-nutbread 2019-10-13 18:41:16 -04:00
parent 693ffebbf7
commit 4443ad370e

View File

@ -920,7 +920,14 @@ async function storagePersistInitialize() {
if (persisted) { if (persisted) {
return; return;
} }
if (await navigator.storage.persist()) { let result = false;
try {
result = await navigator.storage.persist();
} catch (e) {
// NOP
}
if (result) {
persisted = true; persisted = true;
checkbox.checked = true; checkbox.checked = true;
storageShowInfo(); storageShowInfo();