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 domainWindow;
const iconPath = path.join(__dirname, '../resources', 'Icon.png');
exports.create = win => {
if (process.platform === 'darwin' || tray) {
return;
}
const iconPath = path.join(__dirname, '../resources', 'Icon.png');
const toggleWin = () => {
if (win.isVisible()) {
win.hide();

View File

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