@riosst100/pwa-marketplace 2.5.7 → 2.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -142,8 +142,11 @@ export const useShopBy = props => {
|
|
|
142
142
|
|
|
143
143
|
let options = rawData[0].options;
|
|
144
144
|
|
|
145
|
+
console.log(options)
|
|
146
|
+
console.log('options')
|
|
147
|
+
|
|
145
148
|
const mappingData = options.reduce((acc, item) => {
|
|
146
|
-
let firstLetter = item.label.charAt(0).toUpperCase();
|
|
149
|
+
let firstLetter = item.label? item.label.charAt(0).toUpperCase() : '';
|
|
147
150
|
if (!alpha.includes(firstLetter)) {
|
|
148
151
|
firstLetter = '#';
|
|
149
152
|
}
|
|
@@ -204,7 +207,7 @@ export const useShopBy = props => {
|
|
|
204
207
|
const dataResult = useMemo(() => {
|
|
205
208
|
if (filteredOptions) {
|
|
206
209
|
return filteredOptions.reduce((acc, item) => {
|
|
207
|
-
let firstLetter = item.label.charAt(0).toUpperCase();
|
|
210
|
+
let firstLetter = item.label ? item.label.charAt(0).toUpperCase() : '';
|
|
208
211
|
if (!alpha.includes(firstLetter)) {
|
|
209
212
|
firstLetter = '#';
|
|
210
213
|
}
|