mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
Update index.js
Added missing hasOwnProperty check. socket.io breaks without it when Object.prototype has been extended.
This commit is contained in:
@@ -159,7 +159,9 @@ Server.prototype.adapter = function(v){
|
||||
if (!arguments.length) return this._adapter;
|
||||
this._adapter = v;
|
||||
for (var i in this.nsps) {
|
||||
this.nsps[i].initAdapter();
|
||||
if (this.nsps[i].hasOwnProperty(i)) {
|
||||
this.nsps[i].initAdapter();
|
||||
}
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user