Skip to content

Commit b3b295f

Browse files
authored
Merge pull request #334 from Wikia/ER-21271
ER-21271 | check if array is defined
2 parents cfd413f + 0001aa3 commit b3b295f

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)