sr-npm 1.7.503 → 1.7.504
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/backend/data.js +5 -6
- package/package.json +1 -1
package/backend/data.js
CHANGED
|
@@ -38,17 +38,16 @@ async function filterBasedOnBrand(positions) {
|
|
|
38
38
|
return brand === desiredBrand;
|
|
39
39
|
});
|
|
40
40
|
} catch (error) {
|
|
41
|
-
if(error.message
|
|
42
|
-
|
|
41
|
+
if(error.message==="[getTokenFromCMS], No desiredBrand found")
|
|
42
|
+
{
|
|
43
|
+
console.warn(error.message)
|
|
44
|
+
return positions.content;
|
|
43
45
|
}
|
|
44
|
-
|
|
45
|
-
return positions.content;
|
|
46
|
+
throw error;
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
function validateSingleDesiredBrand(desiredBrand) {
|
|
50
|
-
console.log("desiredBrand is: ", desiredBrand);
|
|
51
|
-
console.log("typeof desiredBrand is: ", typeof desiredBrand);
|
|
52
51
|
if(typeof desiredBrand !== 'string' || desiredBrand.includes("[") || desiredBrand.includes("]") || desiredBrand.includes(",")){
|
|
53
52
|
throw new Error("Desired brand must be a single brand");
|
|
54
53
|
}
|