aboutsummaryrefslogtreecommitdiffstats
path: root/src/assets
diff options
context:
space:
mode:
Diffstat (limited to 'src/assets')
-rw-r--r--src/assets/javascripts/general.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/assets/javascripts/general.js b/src/assets/javascripts/general.js
index 7adb0433..588c67d1 100644
--- a/src/assets/javascripts/general.js
+++ b/src/assets/javascripts/general.js
@@ -7,9 +7,9 @@ window.browser = window.browser || window.chrome
let exceptions
function isException(url) {
- if (url !== undefined) {
- for (const item of exceptions.url) if (item == url.href) return true
- for (const item of exceptions.regex) if (new RegExp(item).test(url.href)) return true
+ if (exceptions && url) {
+ if (exceptions.url) for (const item of exceptions.url) if (item == url.href) return true
+ if (exceptions.regex) for (const item of exceptions.regex) if (new RegExp(item).test(url.href)) return true
}
return false
}