Hi! Hope you're doing great! I am getting an error...
# suitecommerce
b
Hi! Hope you're doing great! I am getting an error in Facets.ItemListSortSelector.View. (CORE CODE 2022) That file is the same in 2019 and 2022 core code. The variable: let option_items = this.options.options; in that getContext() function in 2019 returns only the sortOptions object defined in the configuration.
Copy code
getContext: function() {       
        let option_items = this.options.options.sortOptions;
        const { translator } = this.options;
        const processed_option_items = [];

        // if price display is disabled, left aside the filters about price
        if (ProfileModel.getInstance().hidePrices()) {
            option_items = _.filter(option_items, function(item) {
                return item.id.search('price') === -1;
            });
        }
}
The problem is that in 2022 - this.options.options contains all the objects in the configuration instead of only returning sortOptions. Any idea why this is happening? Any configuration I am missing in 2022?
This is what should be returned with this.options.options