Skip to content

Commit

Permalink
stop loading disabled promos
Browse files Browse the repository at this point in the history
  • Loading branch information
vgoodric committed Mar 13, 2024
1 parent 9a0cea9 commit 1d64206
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/features/personalization/personalization.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const appendJsonExt = (path) => (path.endsWith('.json') ? path : `${path}
export const normalizePath = (p) => {
let path = p;

if (!path.includes('/')) {
if (!path?.includes('/')) {
return path;
}

Expand Down Expand Up @@ -480,6 +480,7 @@ export async function getPersConfig(info) {
disabled,
event,
} = info;
if (disabled) return false;
let data = manifestData;
if (!data) {
const fetchedData = await fetchData(manifestPath, DATA_TYPE.JSON);
Expand Down Expand Up @@ -606,6 +607,7 @@ function compareExecutionOrder(a, b) {
export function cleanAndSortManifestList(manifests) {
const manifestObj = {};
manifests.forEach((manifest) => {
if (!manifest) return;
manifest.manifestPath = normalizePath(manifest.manifestUrl || manifest.manifest);
if (manifest.manifestPath in manifestObj) {
let fullManifest = manifestObj[manifest.manifestPath];
Expand Down

0 comments on commit 1d64206

Please sign in to comment.