summaryrefslogtreecommitdiff
path: root/ext/bg/js/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/util.js')
-rw-r--r--ext/bg/js/util.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js
index c88c2768..0527dc0b 100644
--- a/ext/bg/js/util.js
+++ b/ext/bg/js/util.js
@@ -88,6 +88,8 @@ function utilSetDifference(setA, setB) {
function utilStringHashCode(string) {
let hashCode = 0;
+ if (typeof string !== 'string') { return hashCode; }
+
for (let i = 0, charCode = string.charCodeAt(i); i < string.length; charCode = string.charCodeAt(++i)) {
hashCode = ((hashCode << 5) - hashCode) + charCode;
hashCode |= 0;