mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2026-02-04 10:35:30 +00:00
small annoyances
This commit is contained in:
@@ -15,6 +15,11 @@ export class DuplicateWarningChecker extends HTMLElement {
|
||||
const handler = this._createHandler(field);
|
||||
this._boundHandlers.set(field, handler);
|
||||
field.addEventListener("input", handler);
|
||||
// Run initial check on page load only if field has a non-empty value
|
||||
const initialValue = field.value ? field.value.trim() : "";
|
||||
if (initialValue !== "") {
|
||||
this._checkDuplicates(field);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user