@nectary/components 4.5.0 → 4.5.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tooltip/index.js +5 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nectary/components",
3
- "version": "4.5.0",
3
+ "version": "4.5.1",
4
4
  "files": [
5
5
  "**/*/*.css",
6
6
  "**/*/*.json",
package/tooltip/index.js CHANGED
@@ -212,14 +212,13 @@ defineCustomElement('sinch-tooltip', class extends NectaryElement {
212
212
  if (!this.isDomConnected) {
213
213
  return;
214
214
  }
215
+ if (this.#isSubscribed) {
216
+ this.#tooltipState.destroy();
217
+ this.#unsubscribeMouseEnterEvent();
218
+ }
215
219
  const text = this.text;
216
220
  this.#$tooltipText.textContent = text;
217
- if (text.length === 0) {
218
- if (this.#isSubscribed) {
219
- this.#tooltipState.destroy();
220
- this.#unsubscribeMouseEnterEvent();
221
- }
222
- } else {
221
+ if (text.length !== 0) {
223
222
  this.#subscribeMouseEnterEvent();
224
223
  }
225
224
  }