File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -417,14 +417,14 @@ export class GridStackEngine {
417417 // remember it's position & width so we can restore back (1 -> 12 column) #1655 #1985
418418 // IFF we're not in the middle of column resizing!
419419 const saveOrig = ( node . x || 0 ) + ( node . w || 1 ) > this . column ;
420- if ( saveOrig && this . column < this . defaultColumn && ! this . _inColumnResize && ! this . skipCacheUpdate && node . _id && this . findCacheLayout ( node , this . defaultColumn ) === - 1 ) {
420+ if ( saveOrig && this . column < this . defaultColumn && ! this . _inColumnResize && ! this . skipCacheUpdate && ( node . _id ?? false ) && this . findCacheLayout ( node , this . defaultColumn ) === - 1 ) {
421421 const copy = { ...node } ; // need _id + positions
422422 if ( copy . autoPosition || copy . x === undefined ) { delete copy . x ; delete copy . y ; }
423423 else copy . x = Math . min ( this . defaultColumn - 1 , copy . x ) ;
424424 copy . w = Math . min ( this . defaultColumn , copy . w || 1 ) ;
425425 this . cacheOneLayout ( copy , this . defaultColumn ) ;
426426 }
427-
427+
428428 if ( node . w > this . column ) {
429429 node . w = this . column ;
430430 } else if ( node . w < 1 ) {
You can’t perform that action at this time.
0 commit comments