Skip to content

Commit 0001aa3

Browse files
committed
ER-21271: check if array is defined
1 parent cfd413f commit 0001aa3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/components/global-navigation/content-recommendations.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ export default Component.extend({
6565
})
6666
.then(items => {
6767
this.set('model',
68-
items
69-
.filter(item => item.thumbnail)
70-
.map(item => createThumbnail(item, 'thumbnail'))
68+
items ? items.filter(item => item.thumbnail)
69+
.map(item => createThumbnail(item, 'thumbnail'))
70+
: []
7171
);
7272

7373
this.track && this.track({

0 commit comments

Comments
 (0)