File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1435,7 +1435,7 @@ describe('gridstack >', function() {
1435
1435
float : false ,
1436
1436
} ;
1437
1437
var grid = GridStack . init ( options ) ;
1438
- expect ( ( grid as any ) . _styles . ownerNode . parentNode . tagName ) . toBe ( 'DIV' ) ; // any to access private _styles
1438
+ expect ( ( grid as any ) . _styles . parentElement . tagName ) . toBe ( 'DIV' ) ; // any to access private _styles
1439
1439
} ) ;
1440
1440
it ( 'should add STYLE to HEAD if styleInHead === true >' , function ( ) {
1441
1441
var options = {
@@ -1445,7 +1445,7 @@ describe('gridstack >', function() {
1445
1445
styleInHead : true
1446
1446
} ;
1447
1447
var grid = GridStack . init ( options ) ;
1448
- expect ( ( grid as any ) . _styles . ownerNode . parentNode . tagName ) . toBe ( 'HEAD' ) ; // any to access private _styles
1448
+ expect ( ( grid as any ) . _styles . parentElement . tagName ) . toBe ( 'HEAD' ) ; // any to access private _styles
1449
1449
} ) ;
1450
1450
} ) ;
1451
1451
@@ -1458,11 +1458,11 @@ describe('gridstack >', function() {
1458
1458
} ) ;
1459
1459
it ( 'should add STYLE to parent node as a default >' , function ( ) {
1460
1460
var grid = GridStack . init ( ) ;
1461
- expect ( ( grid as any ) . _styles . ownerNode . parentNode . tagName ) . toBe ( 'DIV' ) ;
1461
+ expect ( ( grid as any ) . _styles . parentElement . tagName ) . toBe ( 'DIV' ) ;
1462
1462
} ) ;
1463
1463
it ( 'should add STYLE to HEAD if styleInHead === true >' , function ( ) {
1464
1464
var grid = GridStack . init ( { styleInHead : true } ) ;
1465
- expect ( ( grid as any ) . _styles . ownerNode . parentNode . tagName ) . toBe ( 'HEAD' ) ;
1465
+ expect ( ( grid as any ) . _styles . parentElement . tagName ) . toBe ( 'HEAD' ) ;
1466
1466
} ) ;
1467
1467
} ) ;
1468
1468
Original file line number Diff line number Diff line change @@ -992,10 +992,10 @@ export class GridStack {
992
992
this . el . parentNode . removeChild ( this . el ) ;
993
993
}
994
994
this . _removeStylesheet ( ) ;
995
- if ( this . parentGridNode ) delete this . parentGridNode . subGrid ;
995
+ delete this . parentGridNode ? .subGrid ;
996
996
delete this . parentGridNode ;
997
997
delete this . opts ;
998
- delete this . _placeholder . gridstackNode ;
998
+ delete this . _placeholder ? .gridstackNode ;
999
999
delete this . _placeholder ;
1000
1000
delete this . engine ;
1001
1001
delete this . el . gridstack ; // remove circular dependency that would prevent a freeing
You can’t perform that action at this time.
0 commit comments