Skip to content

Commit

Permalink
don't send extra events during destruction
Browse files Browse the repository at this point in the history
  • Loading branch information
ef4 committed Jan 21, 2022
1 parent c60a7fa commit d000659
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/pikaday-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ export default class extends Component {

@action
onClose() {
if (this.isDestroying) {
return;
}
if (!this.#heardValue) {
this.onSelect(null);
}
Expand Down

0 comments on commit d000659

Please sign in to comment.