From 570cff622396b4bc7b8f8c2d3900b94ae06984fe Mon Sep 17 00:00:00 2001 From: Sukhbir Singh Date: Tue, 24 Oct 2017 16:20:30 -0400 Subject: [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). --- chrome/content/accountWizard/createInBackend.js | 4 ++-- 1 file 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"]), -- cgit v1.2.3