mirror of
https://github.com/unraid/api.git
synced 2025-12-31 13:39:52 -06:00
feat: warning on missing fields
This commit is contained in:
@@ -25,6 +25,9 @@ const getInputFields = (): {
|
|||||||
const form = document.querySelector('form[action="/login"]') as HTMLFormElement;
|
const form = document.querySelector('form[action="/login"]') as HTMLFormElement;
|
||||||
const passwordField = document.querySelector('input[name=password]') as HTMLInputElement;
|
const passwordField = document.querySelector('input[name=password]') as HTMLInputElement;
|
||||||
const usernameField = document.querySelector('input[name=username]') as HTMLInputElement;
|
const usernameField = document.querySelector('input[name=username]') as HTMLInputElement;
|
||||||
|
if (!form || !passwordField || !usernameField) {
|
||||||
|
console.warn('Could not find form, username, or password field');
|
||||||
|
}
|
||||||
return { form, passwordField, usernameField };
|
return { form, passwordField, usernameField };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user