@danielgindi/selectbox 1.0.140 → 1.0.141

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @danielgindi/selectbox 1.0.140
2
+ * @danielgindi/selectbox 1.0.141
3
3
  * git://github.com/danielgindi/selectbox.git
4
4
  */
5
5
  'use strict';
@@ -4451,6 +4451,7 @@ class SelectBox {
4451
4451
  const p = this._p;
4452
4452
 
4453
4453
  setTimeout(() => {
4454
+ if (this[DestroyedSymbol]) return; // destroyed by event handler
4454
4455
  if (p.disabled) return;
4455
4456
 
4456
4457
  this._trigger('search:blur');
@@ -5346,6 +5347,8 @@ class SelectBox {
5346
5347
  */
5347
5348
  _trigger(event, data) {
5348
5349
  const p = this._p;
5350
+ if (p === undefined)
5351
+ return;
5349
5352
  if (p.on)
5350
5353
  p.on(event, ...(data === undefined ? [] : [data]));
5351
5354
  p.mitt.emit(event, data);