aboutsummaryrefslogtreecommitdiffstats
path: root/lib/HostMap.jsm
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2020-03-15 13:32:22 -0500
committerJesús <heckyel@hyperbola.info>2020-03-15 13:32:22 -0500
commit1f0b645b5fddcac822e9933e9b21f2e6903879f2 (patch)
tree25ae8646bda64ff97fd39f56163c22611acd8c4b /lib/HostMap.jsm
parent01c85372ae8e111c41e5a4cb48af53033d041879 (diff)
downloadematrix-1f0b645b5fddcac822e9933e9b21f2e6903879f2.tar.lz
ematrix-1f0b645b5fddcac822e9933e9b21f2e6903879f2.tar.xz
ematrix-1f0b645b5fddcac822e9933e9b21f2e6903879f2.zip
Change the HostMap key again
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');
}