fix(button): guard against _nativeButton not defined
This commit is contained in:
parent
dfb42593d2
commit
1a22c9bc5f
1 changed files with 1 additions and 1 deletions
|
|
@ -175,7 +175,7 @@ export class LionButton extends DisabledWithTabIndexMixin(SlotMixin(LitElement))
|
|||
* Dispatch submit event and invoke submit on the native form when clicked
|
||||
*/
|
||||
__clickDelegationHandler() {
|
||||
if (this.type === 'submit' && this._nativeButtonNode.form) {
|
||||
if (this.type === 'submit' && this._nativeButtonNode && this._nativeButtonNode.form) {
|
||||
this._nativeButtonNode.form.dispatchEvent(new Event('submit'));
|
||||
this._nativeButtonNode.form.submit();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue