Skip to content

Commit 4610e66

Browse files
committed
fix: handle empty picture error
1 parent 374f11e commit 4610e66

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/app/categories/list-item.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ export class CategoriesListItemComponent {
5151
map(([item, parentRouterLink]) =>
5252
item.preview_pictures.pictures.map((pic) => ({
5353
picture: pic?.picture ? pic.picture : null,
54-
route:
55-
pic && pic.picture && parentRouterLink ? parentRouterLink.concat(['pictures', pic.picture.identity]) : null,
56-
thumb: pic.thumb ? pic.thumb : null,
54+
route: pic?.picture && parentRouterLink ? parentRouterLink.concat(['pictures', pic.picture.identity]) : null,
55+
thumb: pic?.thumb ? pic.thumb : null,
5756
})),
5857
),
5958
);

0 commit comments

Comments
 (0)