Skip to content

Commit f350f49

Browse files
committed
fix error when re-loading() fewer items
* guess I was too quick to submit #1785 as test cases were failing.
1 parent 36d65e8 commit f350f49

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

doc/CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ Change log
6666
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
6767

6868
## 4.4.0-dev TBD
69+
* fix [#1901](https://github.com/gridstack/gridstack.js/pull/1901) error introduced for #1785 when re-loading with fewer objects
6970

7071
## 4.4.0 (2021-12-21)
7172
* add [#1887](https://github.com/gridstack/gridstack.js/pull/1887) support for IE (new es5 folder) by [@SmileLifeIven](https://github.com/SmileLifeIven)

src/gridstack-engine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export class GridStackEngine {
273273

274274
/** @internal called to top gravity pack the items back OR revert back to original Y positions when floating */
275275
private _packNodes(): GridStackEngine {
276-
if (this.batchMode) { return; }
276+
if (this.batchMode) { return this; }
277277
this._sortNodes(); // first to last
278278

279279
if (this.float) {

0 commit comments

Comments
 (0)