Fix optimization issue

This commit is contained in:
schmelczerandras 2019-09-01 18:47:31 +02:00
commit d89b43e055
2 changed files with 29 additions and 15 deletions

View file

@ -30,15 +30,18 @@ export class DataService extends Root<Page> {
Serializable.childrenMap = {
Page: {
childrenListName: 'towers',
childrenConstructor: Tower
childrenConstructor: Tower,
childrenType: 'Tower'
},
Tower: {
childrenListName: 'blocks',
childrenConstructor: Block
childrenConstructor: Block,
childrenType: 'Block'
},
Block: {
childrenListName: null,
childrenConstructor: null
childrenConstructor: null,
childrenType: null
}
};

View file

@ -114,7 +114,7 @@ export class StoreService<T> {
return this.storedData;
}
async save(data: T) {
async save(data: T): Promise<void> {
this.storedData = data;
const stringified = JSON.stringify(this.storedData, null, 2);
console.log('save');