File tree Expand file tree Collapse file tree 4 files changed +0
-38
lines changed Expand file tree Collapse file tree 4 files changed +0
-38
lines changed Original file line number Diff line number Diff line change @@ -149,10 +149,6 @@ class Popover extends Tooltip {
149
149
let data = Data . get ( this , DATA_KEY )
150
150
const _config = typeof config === 'object' ? config : null
151
151
152
- if ( ! data && / d i s p o s e | h i d e / . test ( config ) ) {
153
- return
154
- }
155
-
156
152
if ( ! data ) {
157
153
data = new Popover ( this , _config )
158
154
Data . set ( this , DATA_KEY , data )
Original file line number Diff line number Diff line change @@ -725,10 +725,6 @@ class Tooltip extends BaseComponent {
725
725
let data = Data . get ( this , DATA_KEY )
726
726
const _config = typeof config === 'object' && config
727
727
728
- if ( ! data && / d i s p o s e | h i d e / . test ( config ) ) {
729
- return
730
- }
731
-
732
728
if ( ! data ) {
733
729
data = new Tooltip ( this , _config )
734
730
}
Original file line number Diff line number Diff line change @@ -266,21 +266,6 @@ describe('Popover', () => {
266
266
267
267
expect ( popover . show ) . toHaveBeenCalled ( )
268
268
} )
269
-
270
- it ( 'should do nothing if dipose is called when a popover do not exist' , ( ) => {
271
- fixtureEl . innerHTML = '<a href="#" title="Popover" data-bs-content="https://twitter.com/getbootstrap">BS twitter</a>'
272
-
273
- const popoverEl = fixtureEl . querySelector ( 'a' )
274
-
275
- jQueryMock . fn . popover = Popover . jQueryInterface
276
- jQueryMock . elements = [ popoverEl ]
277
-
278
- spyOn ( Popover . prototype , 'dispose' )
279
-
280
- jQueryMock . fn . popover . call ( jQueryMock , 'dispose' )
281
-
282
- expect ( Popover . prototype . dispose ) . not . toHaveBeenCalled ( )
283
- } )
284
269
} )
285
270
286
271
describe ( 'getInstance' , ( ) => {
Original file line number Diff line number Diff line change @@ -1351,21 +1351,6 @@ describe('Tooltip', () => {
1351
1351
expect ( tooltip . show ) . toHaveBeenCalled ( )
1352
1352
} )
1353
1353
1354
- it ( 'should do nothing when we call dispose or hide if there is no tooltip created' , ( ) => {
1355
- fixtureEl . innerHTML = '<div></div>'
1356
-
1357
- const div = fixtureEl . querySelector ( 'div' )
1358
-
1359
- spyOn ( Tooltip . prototype , 'dispose' )
1360
-
1361
- jQueryMock . fn . tooltip = Tooltip . jQueryInterface
1362
- jQueryMock . elements = [ div ]
1363
-
1364
- jQueryMock . fn . tooltip . call ( jQueryMock , 'dispose' )
1365
-
1366
- expect ( Tooltip . prototype . dispose ) . not . toHaveBeenCalled ( )
1367
- } )
1368
-
1369
1354
it ( 'should throw error on undefined method' , ( ) => {
1370
1355
fixtureEl . innerHTML = '<div></div>'
1371
1356
You can’t perform that action at this time.
0 commit comments