Add nicer error message when indexeddb is not available

This commit is contained in:
tobspr 2020-05-21 18:09:07 +02:00
parent ac15fefff0
commit fec5dfd43c
1 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,9 @@ export class StorageImplBrowserIndexedDB extends StorageInterface {
const request = window.indexedDB.open("app_storage", 10);
request.onerror = event => {
logger.error("IDB error:", event);
alert(
"Sorry, it seems your browser has blocked the access to the storage system. This might be the case if you are browsing in private mode for example. I recommend to use google chrome or disable private browsing."
);
reject("Indexed DB access error");
};