Avoid error if input node isn't created yet

This commit is contained in:
nathan 2022-11-18 13:59:20 -07:00
parent 9b00c9b170
commit fd8f688e8b

View File

@ -830,7 +830,7 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(LitFlatpickr))
*/ */
findInputField() : HTMLInputElement findInputField() : HTMLInputElement
{ {
return <HTMLInputElement>this._inputNode.shadowRoot.querySelector('input:not([type="hidden"])'); return <HTMLInputElement>this._inputNode?.shadowRoot?.querySelector('input:not([type="hidden"])');
} }
/** /**