Fix bug when deleting the last item
This commit is contained in:
parent
a22dc1aac3
commit
a42f04cd4a
1 changed files with 2 additions and 0 deletions
|
@ -28,6 +28,8 @@ export class ItemService{
|
||||||
this.dataStore.items = ItemDataResponse.body!.items;
|
this.dataStore.items = ItemDataResponse.body!.items;
|
||||||
this._itemsUpdated.next(Object.assign({},this.dataStore).items);
|
this._itemsUpdated.next(Object.assign({},this.dataStore).items);
|
||||||
} else {
|
} else {
|
||||||
|
this.dataStore.items = [];
|
||||||
|
this._itemsUpdated.next(Object.assign({},this.dataStore).items);
|
||||||
console.log('No items found');
|
console.log('No items found');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue