From 1a22c9bc5fbb3f80f4643f1a51d35a8ffdae59de Mon Sep 17 00:00:00 2001 From: Joren Broekema Date: Wed, 9 Oct 2019 16:23:47 +0200 Subject: [PATCH] fix(button): guard against _nativeButton not defined --- packages/button/src/LionButton.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/button/src/LionButton.js b/packages/button/src/LionButton.js index d462c7f9b..fe23a4ffc 100644 --- a/packages/button/src/LionButton.js +++ b/packages/button/src/LionButton.js @@ -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(); }