File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2252,7 +2252,7 @@ export class GridStack {
2252
2252
this . engine . cleanupNode ( node ) ; // removes all internal _xyz values
2253
2253
node . grid = this ;
2254
2254
}
2255
- delete node . grid . _isTemp ;
2255
+ delete node . grid ? ._isTemp ;
2256
2256
dd . off ( el , 'drag' ) ;
2257
2257
// if we made a copy ('helper' which is temp) of the original node then insert a copy, else we move the original node (#1102)
2258
2258
// as the helper will be nuked by jquery-ui otherwise. TODO: update old code path
Original file line number Diff line number Diff line change @@ -111,9 +111,9 @@ export class Utils {
111
111
112
112
/** true if we should resize to content. strict=true when only 'sizeToContent:true' and not a number which lets user adjust */
113
113
static shouldSizeToContent ( n : GridStackNode | undefined , strict = false ) : boolean {
114
- return n ?. grid && ( strict ?
115
- ( n . sizeToContent === true || ( n . grid . opts . sizeToContent === true && n . sizeToContent === undefined ) ) :
116
- ( ! ! n . sizeToContent || ( n . grid . opts . sizeToContent && n . sizeToContent !== false ) ) ) ;
114
+ return n ?. grid && ( strict ?
115
+ ( n . sizeToContent === true || ( n . grid . opts . sizeToContent === true && n . sizeToContent === undefined ) ) :
116
+ ( ! ! n . sizeToContent || ( n . grid . opts . sizeToContent && n . sizeToContent !== false ) ) ) ;
117
117
}
118
118
119
119
/** returns true if a and b overlap */
You can’t perform that action at this time.
0 commit comments