Use hasOwnProperty when checking for webirc
This commit is contained in:
parent
a6a2336a6f
commit
9686c0383e
@ -139,7 +139,7 @@ Network.prototype.createIrcFramework = function(client) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Network.prototype.createWebIrc = function(client) {
|
Network.prototype.createWebIrc = function(client) {
|
||||||
if (!Helper.config.webirc || !(this.host in Helper.config.webirc)) {
|
if (!Helper.config.webirc || !Helper.config.webirc.hasOwnProperty(this.host)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ Network.prototype.createWebIrc = function(client) {
|
|||||||
this.hostname = this.ip;
|
this.hostname = this.ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Helper.config.webirc[this.host] instanceof Function) {
|
if (typeof Helper.config.webirc[this.host] === "function") {
|
||||||
return Helper.config.webirc[this.host](client, this);
|
return Helper.config.webirc[this.host](client, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user