fixed error handling for domain

This commit is contained in:
akashnimare
2016-07-03 23:52:17 +05:30
parent 9e32deecc3
commit c15fd2b77b
2 changed files with 5 additions and 5 deletions

View File

@@ -12,13 +12,13 @@ let tray = null;
let aboutWindow; let aboutWindow;
let domainWindow; let domainWindow;
const iconPath = path.join(__dirname, '../resources', 'Icon.png');
exports.create = win => { exports.create = win => {
if (process.platform === 'darwin' || tray) { if (process.platform === 'darwin' || tray) {
return; return;
} }
const iconPath = path.join(__dirname, '../resources', 'Icon.png');
const toggleWin = () => { const toggleWin = () => {
if (win.isVisible()) { if (win.isVisible()) {
win.hide(); win.hide();

View File

@@ -9,9 +9,9 @@
window.location.href = 'https://' + data["domain"]; window.location.href = 'https://' + data["domain"];
} else { } else {
dialogs.prompt('Enter the URL for your Zulip server', function(url) { dialogs.prompt('Enter the URL for your Zulip server', function(url) {
url = url.replace(/^https?:\/\//,'') newurl = url.replace(/^https?:\/\//,'')
db.push("/domain", url); db.push("/domain", newurl);
window.location.href = 'https://' + url ; window.location.href = 'https://' + newurl ;
}) })
} }