Skip to content

Commit 8a62c9c

Browse files
committed
MAGE-901: code updated as per code review suggestions
1 parent 0b434b5 commit 8a62c9c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

view/frontend/web/recommend.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ define([
4242
position: index + 1,
4343
}));
4444
},
45-
headerComponent({html}) {
46-
if (this.props.recommendations.length === 0) {
47-
return html
45+
headerComponent({html, recommendations}) {
46+
if (!recommendations.length) {
47+
return '';
4848
}
4949
return recommendProductsHtml.getHeaderHtml(
5050
html,
@@ -78,9 +78,9 @@ define([
7878
position: index + 1,
7979
}));
8080
},
81-
headerComponent({html}) {
82-
if (this.props.recommendations.length === 0) {
83-
return html;
81+
headerComponent({html, recommendations}) {
82+
if (!recommendations.length) {
83+
return '';
8484
}
8585
return recommendProductsHtml.getHeaderHtml(
8686
html,
@@ -121,9 +121,9 @@ define([
121121
position: index + 1,
122122
}));
123123
},
124-
headerComponent({html}) {
125-
if (this.props.recommendations.length === 0) {
126-
return html;
124+
headerComponent({html, recommendations}) {
125+
if (!recommendations.length) {
126+
return '';
127127
}
128128
return recommendProductsHtml.getHeaderHtml(
129129
html,

0 commit comments

Comments
 (0)