Skip to content

Commit 04faf1e

Browse files
committed
Do not show onClicked warning if @type is "submit"
1 parent 1fded0e commit 04faf1e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

addon/components/es-button.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ export default class EsButtonComponent extends Component {
1212

1313

1414
if(!this.args.onClicked) {
15-
// eslint-disable-next-line no-console
16-
console.warn(new Error('Button created with no onClicked'));
15+
if (this.args.type !== 'submit') {
16+
// eslint-disable-next-line no-console
17+
console.warn(new Error('Button created with no onClicked'));
18+
}
1719
} else {
1820
this._onClicked = this.args.onClicked;
1921
}

0 commit comments

Comments
 (0)