Fix: use IIFE for try-catch in tDocLoader
This commit is contained in:
parent
7c1b140de9
commit
51e92e5a7b
|
@ -103,11 +103,11 @@ function tNodeList(nodes) {
|
||||||
|
|
||||||
function tDocLoader() {
|
function tDocLoader() {
|
||||||
t.DOMParser = new DOMParser();
|
t.DOMParser = new DOMParser();
|
||||||
try {
|
t.cache = (function () {
|
||||||
t.cache = JSON.parse(localStorage.L10N);
|
try {
|
||||||
} catch (err) {
|
return JSON.parse(localStorage.L10N);
|
||||||
t.cache = {};
|
} catch (e) {}
|
||||||
}
|
})() || {};
|
||||||
|
|
||||||
// reset L10N cache on UI language change
|
// reset L10N cache on UI language change
|
||||||
const UIlang = chrome.i18n.getUILanguage();
|
const UIlang = chrome.i18n.getUILanguage();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user