From e3edd5267dff4c93532b51a45fdd8163caed8e06 Mon Sep 17 00:00:00 2001 From: wltsmrz Date: Fri, 16 Aug 2013 13:15:16 -0700 Subject: [PATCH] Fix secure configuration; Boolean constructor should be string --- src/js/ripple/server.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/js/ripple/server.js b/src/js/ripple/server.js index 536fb6b8..70211256 100644 --- a/src/js/ripple/server.js +++ b/src/js/ripple/server.js @@ -24,7 +24,7 @@ function Server(remote, opts) { this._opts = opts; this._host = opts.host; this._port = opts.port; - this._secure = typeof opts.secure === Boolean ? opts.secure : true; + this._secure = typeof opts.secure === 'boolean' ? opts.secure : true; this._ws = void(0); this._connected = false; this._should_connect = false; @@ -33,8 +33,7 @@ function Server(remote, opts) { this._retry = 0; this._requests = { }; - this._opts.url = (opts.secure ? 'wss://' : 'ws://') - + [ opts.host, opts.port ].join(':'); + this._opts.url = (opts.secure ? 'wss://' : 'ws://') + opts.host + ':' + opts.port; this.on('message', function(message) { self._handle_message(message);