File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2252,7 +2252,7 @@ export class GridStack {
22522252 this . engine . cleanupNode ( node ) ; // removes all internal _xyz values
22532253 node . grid = this ;
22542254 }
2255- delete node . grid . _isTemp ;
2255+ delete node . grid ? ._isTemp ;
22562256 dd . off ( el , 'drag' ) ;
22572257 // if we made a copy ('helper' which is temp) of the original node then insert a copy, else we move the original node (#1102)
22582258 // 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 {
111111
112112 /** true if we should resize to content. strict=true when only 'sizeToContent:true' and not a number which lets user adjust */
113113 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 ) ) ) ;
117117 }
118118
119119 /** returns true if a and b overlap */
You can’t perform that action at this time.
0 commit comments