aboutsummaryrefslogtreecommitdiffstats
path: root/lib/HostMap.jsm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/HostMap.jsm')
-rw-r--r--lib/HostMap.jsm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/HostMap.jsm b/lib/HostMap.jsm
index 59d4f65..ecbce25 100644
--- a/lib/HostMap.jsm
+++ b/lib/HostMap.jsm
@@ -31,7 +31,7 @@ var map = new Map();
var HostMap = {
put: function (key, value) {
- if (!(key instanceof Ci.nsIURI) || !(value instanceof Ci.nsIURI)
+ if (typeof key !== 'string' || !(value instanceof Ci.nsIURI)
|| !key || !value) {
throw new Error('invalid argument(s)');
}
@@ -43,7 +43,7 @@ var HostMap = {
map.set(key, value);
},
get: function (key) {
- if (!(key instanceof Ci.nsIURI) || !key) {
+ if (typeof key !== 'string' || !key) {
throw new Error('invalid argument');
}