@@ -45,40 +45,40 @@ define([], function () {
4545
4646 getColorHtml : function ( item , components , html ) {
4747 const highlight = this . safeHighlight ( components , item , "color" ) ;
48-
49- return highlight
48+
49+ return highlight
5050 ? html `< span class ="color "> color: ${ highlight } </ span > `
5151 : "" ;
5252 } ,
5353
5454 getCategoriesHtml : function ( item , components , html ) {
5555 const highlight = this . safeHighlight ( components , item , "categories_without_path" , false ) ;
5656
57- return highlight
57+ return highlight
5858 ? html `< span > in ${ highlight } </ span > `
5959 : "" ;
6060 } ,
6161
6262 getOriginalPriceHtml : ( item , html , priceGroup ) => {
63- if ( item [ 'price' ] [ algoliaConfig . currencyCode ] [ priceGroup + '_original_formated' ] == null ) return "" ;
63+ if ( item [ 'price' ] ?. [ algoliaConfig . currencyCode ] ?. [ priceGroup + '_original_formated' ] == null ) return "" ;
6464
6565 return html `< span class ="before_special "> ${ item [ 'price' ] [ algoliaConfig . currencyCode ] [ priceGroup + '_original_formated' ] } </ span > ` ;
6666 } ,
6767
6868 getTierPriceHtml : ( item , html , priceGroup ) => {
69- if ( item [ 'price' ] [ algoliaConfig . currencyCode ] [ priceGroup + '_tier_formated' ] == null ) return "" ;
69+ if ( item [ 'price' ] ?. [ algoliaConfig . currencyCode ] ?. [ priceGroup + '_tier_formated' ] == null ) return "" ;
7070
7171 return html `< span class ="tier_price "> As low as < span class ="tier_value "> ${ item [ 'price' ] [ algoliaConfig . currencyCode ] [ priceGroup + '_tier_formated' ] } </ span > </ span > ` ;
7272 } ,
7373
7474 getPricingHtml : function ( item , html ) {
75- if ( item [ 'price' ] == undefined ) return "" ;
75+ if ( item [ 'price' ] == null ) return "" ;
7676
7777 const priceGroup = algoliaConfig . priceGroup || 'default' ;
7878
7979 return html `< div className ="algoliasearch-autocomplete-price ">
80- < span className ="after_special ${ item [ 'price' ] [ algoliaConfig . currencyCode ] [ priceGroup + '_original_formated' ] != null ? 'promotion' : '' } ">
81- ${ item [ 'price' ] [ algoliaConfig . currencyCode ] [ priceGroup + '_formated' ] }
80+ < span className ="after_special ${ item [ 'price' ] ?. [ algoliaConfig . currencyCode ] ?. [ priceGroup + '_original_formated' ] != null ? 'promotion' : '' } ">
81+ ${ item [ 'price' ] ?. [ algoliaConfig . currencyCode ] ?. [ priceGroup + '_formated' ] }
8282 </ span >
8383 ${ this . getOriginalPriceHtml ( item , html , priceGroup ) }
8484
@@ -87,7 +87,7 @@ define([], function () {
8787 } ,
8888
8989 getFooterSearchCategoryLinks : ( html , resultDetails ) => {
90- if ( resultDetails . allCategories == undefined || resultDetails . allCategories . length === 0 ) return "" ;
90+ if ( resultDetails . allCategories == null || resultDetails . allCategories . length === 0 ) return "" ;
9191
9292 return html ` ${ algoliaConfig . translations . orIn }
9393 ${ resultDetails . allCategories . map ( ( list , index ) =>
0 commit comments