Merge pull request #2849 from thelounge/xpaw/webirc-ownprop
Use hasOwnProperty when checking for webirc
This commit is contained in:
commit
010ddab78e
@ -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