Skip to content

Commit

Permalink
If no server option is specified, use the current hostname and port
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelklehr committed Apr 1, 2013
1 parent 9055d8b commit dca7f23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.js
Expand Up @@ -9,7 +9,7 @@ exports.TextinputAdapter = require('./lib/TextinputAdapter')
exports.connect = function(options) {
var options =
{ editor: options.editor || null // compulsory
, server: options.server || 'http://localhost'
, server: options.server || '//'+window.location.hostname+':'+window.location.port
, document: options.document || null // compulsory
}
for(var prop in options) if (!options[prop]) throw new Error('"'+prop+'" option is not set')
Expand Down

0 comments on commit dca7f23

Please sign in to comment.