From cf0bc12aa159578f4bf4765661a779c68274f864 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sun, 14 Jul 2019 11:21:30 -0400 Subject: [PATCH] allow notification bar username of length 0 --- jslib | 2 +- src/content/notificationBar.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/jslib b/jslib index 84aab0cb24..d61794265a 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 84aab0cb24b8418c625c28c79e8c190861531c5f +Subproject commit d61794265a12076b765876b52cef597862727b1f diff --git a/src/content/notificationBar.ts b/src/content/notificationBar.ts index 5f7bfbeae7..07dbafa0fc 100644 --- a/src/content/notificationBar.ts +++ b/src/content/notificationBar.ts @@ -261,7 +261,8 @@ document.addEventListener('DOMContentLoaded', (event) => { function locateFields(formDataObj: any) { const inputs = Array.from(document.getElementsByTagName('input')); formDataObj.usernameEl = locateField(formDataObj.formEl, formDataObj.data.username, inputs); - if (formDataObj.usernameEl != null && formDataObj.usernameEl.value.length < 2) { + if (formDataObj.usernameEl != null && formDataObj.usernameEl.value.length > 0 && + formDataObj.usernameEl.value.length < 2) { formDataObj.usernameEl = null; } if (formDataObj.usernameEl != null && formDataObj.data.password != null) {