Accessibility checks are now made before trying to access local storage. Fixes #174.

This commit is contained in:
n1474335 2017-09-20 22:26:47 +01:00
parent c60ec7c170
commit e2cae035f2
5 changed files with 66 additions and 12 deletions

View file

@ -35,7 +35,11 @@
"use strict";
// Load theme before the preloader is shown
document.querySelector(":root").className = (JSON.parse(localStorage.getItem("options")) || {}).theme;
try {
document.querySelector(":root").className = (JSON.parse(localStorage.getItem("options")) || {}).theme;
} catch (err) {
// LocalStorage access is denied by security settings
}
// Define loading messages
const loadingMsgs = [