From 04faf1e42b39edcf133e0f0a664427c1e966d5df Mon Sep 17 00:00:00 2001 From: Tommy Carter Date: Sun, 12 Jan 2025 09:44:53 -0600 Subject: [PATCH] Do not show onClicked warning if @type is "submit" --- addon/components/es-button.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addon/components/es-button.js b/addon/components/es-button.js index 8e21e626..a2645601 100644 --- a/addon/components/es-button.js +++ b/addon/components/es-button.js @@ -12,8 +12,10 @@ export default class EsButtonComponent extends Component { if(!this.args.onClicked) { - // eslint-disable-next-line no-console - console.warn(new Error('Button created with no onClicked')); + if (this.args.type !== 'submit') { + // eslint-disable-next-line no-console + console.warn(new Error('Button created with no onClicked')); + } } else { this._onClicked = this.args.onClicked; }