https error handling in domain

This commit is contained in:
akashnimare
2016-07-03 20:26:28 +05:30
parent 680c6ef338
commit 9e32deecc3
2 changed files with 5 additions and 1 deletions

View File

@@ -9,6 +9,7 @@
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 ;
})