emoji-picker-element
Advanced tools
Comparing version 1.8.1 to 1.8.2
@@ -0,1 +1,10 @@ | ||
## [1.8.2](https://github.com/nolanlawson/emoji-picker-element/compare/v1.8.1...v1.8.2) (2021-09-26) | ||
### Bug Fixes | ||
* fix db undefined when adding/removing element ([#227](https://github.com/nolanlawson/emoji-picker-element/issues/227)) ([fa24942](https://github.com/nolanlawson/emoji-picker-element/commit/fa2494223dbc241e18fab764f7ec1a659618d8a9)), closes [#225](https://github.com/nolanlawson/emoji-picker-element/issues/225) | ||
## [1.8.1](https://github.com/nolanlawson/emoji-picker-element/compare/v1.8.0...v1.8.1) (2021-09-03) | ||
@@ -2,0 +11,0 @@ |
@@ -862,6 +862,15 @@ function assertNonEmptyString (str) { | ||
async ready () { | ||
if (!this._ready) { | ||
this._ready = this._init(); | ||
const checkReady = async () => { | ||
if (!this._ready) { | ||
this._ready = this._init(); | ||
} | ||
return this._ready | ||
}; | ||
await checkReady(); | ||
// There's a possibility of a race condition where the element gets added, removed, and then added again | ||
// with a particular timing, which would set the _db to undefined. | ||
// We *could* do a while loop here, but that seems excessive and could lead to an infinite loop. | ||
if (!this._db) { | ||
await checkReady(); | ||
} | ||
return this._ready | ||
} | ||
@@ -868,0 +877,0 @@ |
{ | ||
"name": "emoji-picker-element", | ||
"version": "1.8.1", | ||
"version": "1.8.2", | ||
"description": "Lightweight emoji picker distributed as a web component", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
540263
5989