Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

Commit

Permalink
Fix error when --update-url was not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
MadLittleMods committed Feb 22, 2016
1 parent 04a9e7a commit 28e4d1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nwapp/utils/auto-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ var quitApp = require('./quit-app');

// You can change the place we use to check and download updates with this CLI parameter `--update-url=192.168.0.58:3010`
// We use this for testing a release
var updateUrlOption = argv['update-url'];
var updateUrlOption = argv['update-url'] || '';
var transposeUpdateUrl = function(targetUrl) {
targetUrl = targetUrl || '';
var parsedTargetUrl = urlParse(targetUrl);
var parsedUpdateUrl = urlParse(updateUrlOption);
parsedTargetUrl.protocol = parsedUpdateUrl.protocol || 'http:';
Expand Down

0 comments on commit 28e4d1e

Please sign in to comment.