Skip to content

Commit 6169005

Browse files
fix: unexpected exception on grid-layout mount
When the `layout` prop changes quickly after the grid-layout gets created, `layoutUpdate` is called before the `originalLayout` property is set, causing an uncaught exception.
1 parent 1636cbe commit 6169005

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/GridLayout.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
});
224224
},
225225
layoutUpdate() {
226-
if (this.layout !== undefined) {
226+
if (this.layout !== undefined && this.originalLayout !== null) {
227227
if (this.layout.length !== this.originalLayout.length) {
228228
// console.log("### LAYOUT UPDATE!", this.layout.length, this.originalLayout.length);
229229

0 commit comments

Comments
 (0)