Skip to content

Commit d19ebd8

Browse files
committed
fix(ModelManager): Add views populated with name and id
1 parent 96309f2 commit d19ebd8

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/core/ModelManager.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,11 @@ export default class ModelManager {
239239
if (!this.data[this.activeViewName]) {
240240
this.data = assignObjKey(this.data, this.activeViewName, []);
241241
}
242-
if (!this.data[this.activeViewName][this.activeViewIndex]) {
243-
this.data[this.activeViewName].splice(this.activeViewIndex, 1, {});
242+
while (this.data[this.activeViewName].length < this.activeViewIndex + 1) {
243+
this.data[this.activeViewName].push({
244+
name: this.localizedData.getView(this.activeViewName),
245+
id: this.getNextViewId(),
246+
});
244247
}
245248

246249
const viewData = this.data[this.activeViewName][this.activeViewIndex];

0 commit comments

Comments
 (0)