Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2014-06-05 07:57:54 +0400
committerFeross Aboukhadijeh <feross@feross.org>2014-06-05 07:57:54 +0400
commit726be62c123c39af0c737e64f9d9c83fd49b3d5e (patch)
tree2b394d35b89511e6eab5b4a97080c36903898b4c /bin
parent4b21b6d98d6ffb9b53cc6bfe287c14e4a34996af (diff)
fix address() bug
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cmd.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/cmd.js b/bin/cmd.js
index e957869..5e1d004 100755
--- a/bin/cmd.js
+++ b/bin/cmd.js
@@ -199,7 +199,9 @@ function onTorrent (torrent) {
process.exit(0)
}
- var href = 'http://' + address() + ':' + client.server.address().port + '/'
+ if (client.server) {
+ var href = 'http://' + address() + ':' + client.server.address().port + '/'
+ }
if (argv.vlc && process.platform === 'win32') {
var registry = require('windows-no-runnable').registry