check if proxy option is undefined, not if it exists

This commit is contained in:
Reed Rosenbluth
2015-07-21 16:40:46 -07:00
parent e997c44a18
commit a2b31e2677

View File

@@ -437,7 +437,7 @@ Server.prototype.connect = function() {
log.info(this.getServerID(), 'connect');
}
if (this._remote.hasOwnProperty('proxy')) {
if (this._remote.proxy !== undefined) {
const parsed = url.parse(this._opts.url);
const opts = url.parse(this._remote.proxy);
opts.secureEndpoint = parsed.protocol === 'wss:';