Throw on bad server url

// FREEBIE
This commit is contained in:
lilia 2015-09-24 17:59:57 -07:00
parent e30ac86c8a
commit 868695558d
2 changed files with 6 additions and 0 deletions

View file

@ -38790,6 +38790,9 @@ var TextSecureServer = (function() {
var attachment_id_regex = RegExp( "^https:\/\/.*\/(\\d+)\?");
function TextSecureServer(url, username, password) {
if (typeof url !== 'string') {
throw new Error('Invalid server url');
}
this.url = url;
this.username = username;
this.password = password;

View file

@ -73,6 +73,9 @@ var TextSecureServer = (function() {
var attachment_id_regex = RegExp( "^https:\/\/.*\/(\\d+)\?");
function TextSecureServer(url, username, password) {
if (typeof url !== 'string') {
throw new Error('Invalid server url');
}
this.url = url;
this.username = username;
this.password = password;