From d7266c75db1f425299265f4c4de1fdc929018fbd Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 8 Nov 2023 23:21:19 +1100 Subject: [PATCH] check for undefined in username and password --- src/utils/lightdm.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/lightdm.ts b/src/utils/lightdm.ts index c7e9ebb..216270f 100644 --- a/src/utils/lightdm.ts +++ b/src/utils/lightdm.ts @@ -280,9 +280,9 @@ class LightdmNode extends LightdmWebkit { window.lightdm?.show_prompt?.connect((_message, type) => { console.log({ _message, type }) if (!window.lightdm) return - if (type === 0) { + if (type === 0 && this._username !== undefined) { window.lightdm.respond(this._username) - } else if (type === 1 && window.lightdm.in_authentication) { + } else if (type === 1 && window.lightdm.in_authentication && this._password !== undefined) { window.lightdm.respond(this._password) } })