Skip to content

Commit 637889e

Browse files
committed
[FIX] awesome_owl: Fixed error when counter doesnt have a onChange attribute
1 parent 5127c60 commit 637889e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

awesome_owl/static/src/counter/counter.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ export class Counter extends Component {
1414

1515
increment() {
1616
this.state.value++;
17-
this.props.onChange();
17+
if(this.props.onChange) {
18+
this.props.onChange();
19+
}
1820
}
1921
}

0 commit comments

Comments
 (0)