Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9875352

Browse files
Merge pull request gridstack#3077 from FilipKujavec/fix/gridstack#3071-if-node._id-still-false
fix: incorrect node._id check
2 parents 276e107 + 4a32549 commit 9875352

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/gridstack-engine.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ 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 ??false) && this.findCacheLayout(node, this.defaultColumn) === -1) {
420+
if (saveOrig && this.column < this.defaultColumn && !this._inColumnResize && !this.skipCacheUpdate && node._id !=null && 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);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /