Skip to content

Commit 6e55abb

Browse files
Zdravko BranzovZdravko Branzov
Zdravko Branzov
authored and
Zdravko Branzov
committed
fix: binding of list items when only one item is left in the array
1 parent db18ec5 commit 6e55abb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/groceries/grocery-list/item-status.pipe.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Grocery } from "../shared";
88
export class ItemStatusPipe implements PipeTransform {
99
value: Array<Grocery> = [];
1010
transform(items: Array<Grocery>, deleted: boolean) {
11-
if (items && items.length) {
11+
if (items instanceof Array) {
1212
this.value = items.filter((grocery: Grocery) => {
1313
return grocery.deleted === deleted;
1414
});

0 commit comments

Comments
 (0)