sr-npm 1.7.515 → 1.7.516
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 +1 -1
- package/pages/careersPage.js +14 -9
package/package.json
CHANGED
package/pages/careersPage.js
CHANGED
|
@@ -496,20 +496,25 @@ async function updateMapMarkers(_$w){
|
|
|
496
496
|
|
|
497
497
|
}
|
|
498
498
|
|
|
499
|
-
async function handleBrandDropdown(_$w){
|
|
500
|
-
const brands=await wixData.query(COLLECTIONS.BRANDS).find();
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
499
|
+
async function handleBrandDropdown(_$w) {
|
|
500
|
+
const brands = await wixData.query(COLLECTIONS.BRANDS).find();
|
|
501
|
+
let disableMultiBrand;
|
|
502
|
+
try {
|
|
503
|
+
disableMultiBrand = await getTokenFromCMS(TOKEN_NAME.DISABLE_MULTI_BRAND);
|
|
504
|
+
} catch (e) {
|
|
505
|
+
if (e.message !== "[getTokenFromCMS], No disableMultiBrand found") throw e;
|
|
506
|
+
console.log("disableMultiBrand token wasn't found");
|
|
507
|
+
|
|
505
508
|
}
|
|
506
|
-
|
|
507
|
-
|
|
509
|
+
if (disableMultiBrand === 'true') {
|
|
510
|
+
console.log("hiding brand dropdown");
|
|
511
|
+
_$w('#dropdownBrand').hide();
|
|
512
|
+
} else if (brands.items.length > 1) {
|
|
508
513
|
console.log("showing brand dropdown");
|
|
509
514
|
_$w('#dropdownBrand').show();
|
|
510
515
|
}
|
|
511
|
-
}
|
|
512
516
|
}
|
|
517
|
+
|
|
513
518
|
module.exports = {
|
|
514
519
|
careersPageOnReady,
|
|
515
520
|
};
|