The translation of transports into some kind of object breaks socketio. A fix could be adding obj[key].constructor !== Array to nowUtil.extend ensuring that arrays are not traversed but just set.
Change nowUtil.js from
extend: function (target, obj) {
for (var i = 0, keys = Object.keys(obj), ii = keys.length; i < ii; i++) {
var key = keys[i];
if (obj[key] && typeof obj[key] === 'object') {
target[key] = target[key] || {};
util.extend(target[key], obj[key]);
} else {
target[key] = obj[key];
}
}
},
to:
extend: function (target, obj) {
for (var i = 0, keys = Object.keys(obj), ii = keys.length; i < ii; i++) {
var key = keys[i];
if (obj[key] && typeof obj[key] === 'object' && obj[key].constructor !== Array) {
target[key] = target[key] || {};
util.extend(target[key], obj[key]);
} else {
target[key] = obj[key];
}
}
},
Hope this makes sense and sorry for not just patching but I'm still new to github :S
Changing the transport setting of the internal socket.io isn't possible right now since the setter takes an array like this:
The problem is at now.js#L117:
which changes the options:
The translation of transports into some kind of object breaks socketio. A fix could be adding
obj[key].constructor !== Array
to nowUtil.extend ensuring that arrays are not traversed but just set.Change nowUtil.js from
to:
Hope this makes sense and sorry for not just patching but I'm still new to github :S