File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,10 @@ define([
42
42
position : index + 1 ,
43
43
} ) ) ;
44
44
} ,
45
- headerComponent ( { html} ) {
45
+ headerComponent ( { html, recommendations} ) {
46
+ if ( ! recommendations . length ) {
47
+ return '' ;
48
+ }
46
49
return recommendProductsHtml . getHeaderHtml (
47
50
html ,
48
51
algoliaConfig . recommend . FBTTitle
@@ -75,7 +78,10 @@ define([
75
78
position : index + 1 ,
76
79
} ) ) ;
77
80
} ,
78
- headerComponent ( { html} ) {
81
+ headerComponent ( { html, recommendations} ) {
82
+ if ( ! recommendations . length ) {
83
+ return '' ;
84
+ }
79
85
return recommendProductsHtml . getHeaderHtml (
80
86
html ,
81
87
algoliaConfig . recommend . relatedProductsTitle
@@ -115,7 +121,10 @@ define([
115
121
position : index + 1 ,
116
122
} ) ) ;
117
123
} ,
118
- headerComponent ( { html} ) {
124
+ headerComponent ( { html, recommendations} ) {
125
+ if ( ! recommendations . length ) {
126
+ return '' ;
127
+ }
119
128
return recommendProductsHtml . getHeaderHtml (
120
129
html ,
121
130
algoliaConfig . recommend . trendingItemsTitle
You can’t perform that action at this time.
0 commit comments