0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-26 23:54:23 +01:00

Fix lint and remove fit

This commit is contained in:
Dmitry Sergienko 2024-09-19 12:49:34 +04:00
parent 6579b9a674
commit 9fb58bb33f
2 changed files with 2 additions and 3 deletions

View File

@ -186,14 +186,13 @@ class Tooltip extends BaseComponent {
throw new Error('Please use show on visible elements') 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 return
} }
const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW)) const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW))
const shadowRoot = findShadowRoot(this._element) const shadowRoot = findShadowRoot(this._element)
const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element) const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element)
if (showEvent.defaultPrevented || !isInTheDom) { if (showEvent.defaultPrevented || !isInTheDom) {
return return
} }

View File

@ -56,7 +56,7 @@ describe('Popover', () => {
}) })
describe('show', () => { 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 => { return new Promise(resolve => {
fixtureEl.innerHTML = '<a href="#">BS twitter</a>' fixtureEl.innerHTML = '<a href="#">BS twitter</a>'