From 2eb9f1a66e190ef7821a624907fe6ea972ab37f4 Mon Sep 17 00:00:00 2001 From: Miodec Date: Mon, 23 Oct 2023 14:58:14 +0100 Subject: [PATCH] fix: google auth accounts not being able to change name closes #4736 --- frontend/src/ts/popups/simple-popups.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/ts/popups/simple-popups.ts b/frontend/src/ts/popups/simple-popups.ts index f9a5cc39f..57f21b54f 100644 --- a/frontend/src/ts/popups/simple-popups.ts +++ b/frontend/src/ts/popups/simple-popups.ts @@ -222,7 +222,16 @@ class SimplePopup { } }); - if (vals.some((v) => v === undefined || v === "")) { + const inputsWithCurrentValue = []; + for (let i = 0; i < this.inputs.length; i++) { + inputsWithCurrentValue.push({ ...this.inputs[i], currentValue: vals[i] }); + } + + if ( + inputsWithCurrentValue + .filter((i) => !i.hidden) + .some((v) => v.currentValue === undefined || v.currentValue === "") + ) { Notifications.add("Please fill in all fields", 0); return; }