Skip to content

Commit 1a22c9b

Browse files
author
Joren Broekema
committed
fix(button): guard against _nativeButton not defined
1 parent dfb4259 commit 1a22c9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/button/src/LionButton.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export class LionButton extends DisabledWithTabIndexMixin(SlotMixin(LitElement))
175175
* Dispatch submit event and invoke submit on the native form when clicked
176176
*/
177177
__clickDelegationHandler() {
178-
if (this.type === 'submit' && this._nativeButtonNode.form) {
178+
if (this.type === 'submit' && this._nativeButtonNode && this._nativeButtonNode.form) {
179179
this._nativeButtonNode.form.dispatchEvent(new Event('submit'));
180180
this._nativeButtonNode.form.submit();
181181
}

0 commit comments

Comments
 (0)