summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSukhbir Singh <sukhbir@torproject.org>2017-10-24 16:20:30 -0400
committerKali Kaneko <kali@leap.se>2017-10-30 16:50:18 +0100
commit570cff622396b4bc7b8f8c2d3900b94ae06984fe (patch)
treecac1aa89d910f2843d994998e43909dd29eb2b7c
parent79e9d38184f4b3c68d31dd1d17b53d10829ef902 (diff)
[bug] Replace instances of String.prototype.contains with String.prototype.includes
In Firefox 48, contains() has been replaced with includes(). See https://bugzilla.mozilla.org/show_bug.cgi?id=1102219 for more information. This bug was preventing the extension from configuring a new Bitmask account (see issues #9 and #10).
-rw-r--r--chrome/content/accountWizard/createInBackend.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/content/accountWizard/createInBackend.js b/chrome/content/accountWizard/createInBackend.js
index f15b882..46dbbae 100644
--- a/chrome/content/accountWizard/createInBackend.js
+++ b/chrome/content/accountWizard/createInBackend.js
@@ -236,7 +236,7 @@ function rememberPassword(server, password)
login.init(passwordURI, null, passwordURI, server.username, password, "", "");
try {
Services.logins.addLogin(login);
- } catch (e if e.message.contains("This login already exists")) {
+ } catch (e if e.message.includes("This login already exists")) {
// TODO modify
}
}
@@ -263,7 +263,7 @@ function checkIncomingServerAlreadyExists(config)
// if username does not have an '@', also check the e-mail
// address form of the name.
- if (!existing && !incoming.username.contains("@"))
+ if (!existing && !incoming.username.includes("@"))
existing = MailServices.accounts.findRealServer(config.identity.emailAddress,
incoming.hostname,
sanitize.enum(incoming.type, ["pop3", "imap", "nntp"]),