Skip to content

Commit

Permalink
Make sure onshow is a function before calling it
Browse files Browse the repository at this point in the history
Co-authored-by: David Wheatley <hi@davwheat.dev>
  • Loading branch information
dsevillamartin and davwheat committed Aug 13, 2021
1 parent 0b5060a commit a36a3fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/common/components/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class Dropdown extends Component {
m.redraw.sync();
}

if (onshow) {
if (typeof onshow === 'function') {
onshow();
}

Expand Down

0 comments on commit a36a3fe

Please sign in to comment.