Skip to content

Commit

Permalink
Fix lint and remove fit
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrysergienkocodefirst committed Sep 19, 2024
1 parent 6579b9a commit 9fb58bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions js/src/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion js/tests/unit/popover.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<a href="#">BS twitter</a>'

Expand Down

0 comments on commit 9fb58bb

Please sign in to comment.