From d0006599bdb9b1a4d6125766333f1adefd10e665 Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Thu, 20 Jan 2022 23:00:05 -0500 Subject: [PATCH] don't send extra events during destruction --- src/components/pikaday-input.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/pikaday-input.js b/src/components/pikaday-input.js index 181841d..42979fd 100644 --- a/src/components/pikaday-input.js +++ b/src/components/pikaday-input.js @@ -59,6 +59,9 @@ export default class extends Component { @action onClose() { + if (this.isDestroying) { + return; + } if (!this.#heardValue) { this.onSelect(null); }