We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfb4259 commit 1a22c9bCopy full SHA for 1a22c9b
packages/button/src/LionButton.js
@@ -175,7 +175,7 @@ export class LionButton extends DisabledWithTabIndexMixin(SlotMixin(LitElement))
175
* Dispatch submit event and invoke submit on the native form when clicked
176
*/
177
__clickDelegationHandler() {
178
- if (this.type === 'submit' && this._nativeButtonNode.form) {
+ if (this.type === 'submit' && this._nativeButtonNode && this._nativeButtonNode.form) {
179
this._nativeButtonNode.form.dispatchEvent(new Event('submit'));
180
this._nativeButtonNode.form.submit();
181
}
0 commit comments