From 11d34cff88d11e67a8046ff6bbb11c4686be8401 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 18 Jan 2020 07:34:12 -0500 Subject: [PATCH] dont toLower the saved username on addLogin --- src/background/runtime.background.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/background/runtime.background.ts b/src/background/runtime.background.ts index 8d94637ab4..72ee3ef153 100644 --- a/src/background/runtime.background.ts +++ b/src/background/runtime.background.ts @@ -285,13 +285,14 @@ export default class RuntimeBackground { return; } - if (loginInfo.username != null) { - loginInfo.username = loginInfo.username.toLowerCase(); + let normalizedUsername = loginInfo.username; + if (normalizedUsername != null) { + normalizedUsername = normalizedUsername.toLowerCase(); } const ciphers = await this.cipherService.getAllDecryptedForUrl(loginInfo.url); const usernameMatches = ciphers.filter((c) => - c.login.username != null && c.login.username.toLowerCase() === loginInfo.username); + c.login.username != null && c.login.username.toLowerCase() === normalizedUsername); if (usernameMatches.length === 0) { const disabledAddLogin = await this.storageService.get( ConstantsService.disableAddLoginNotificationKey);