From 9fb58bb33fc6fe200acee38416a54be1b8abab09 Mon Sep 17 00:00:00 2001 From: Dmitry Sergienko Date: Thu, 19 Sep 2024 12:49:34 +0400 Subject: [PATCH] Fix lint and remove fit --- js/src/tooltip.js | 3 +-- js/tests/unit/popover.spec.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/js/src/tooltip.js b/js/src/tooltip.js index d4b3c9f0ed75..bcb044a3b3bf 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -186,14 +186,13 @@ class Tooltip extends BaseComponent { throw new Error('Please use show on visible elements') } - if (!((this._isWithContent() || this._newContent != null) && this._isEnabled)) { + if (!((this._isWithContent() || this._newContent !== null) && this._isEnabled)) { return } const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW)) const shadowRoot = findShadowRoot(this._element) const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element) - if (showEvent.defaultPrevented || !isInTheDom) { return } diff --git a/js/tests/unit/popover.spec.js b/js/tests/unit/popover.spec.js index 63642be3b210..a1a86a0d9e80 100644 --- a/js/tests/unit/popover.spec.js +++ b/js/tests/unit/popover.spec.js @@ -56,7 +56,7 @@ describe('Popover', () => { }) describe('show', () => { - fit('should show a popover with no content after setContent', () => { + it('should show a popover with no content after setContent', () => { return new Promise(resolve => { fixtureEl.innerHTML = 'BS twitter'