Merged in feature/IO-3236-HasFeatureAccess-Date (pull request #2323)

IO-3236 HasFeatureAccess Date

Approved-by: Dave Richer
This commit is contained in:
Allan Carr
2025-05-21 18:05:23 +00:00
committed by Dave Richer

View File

@@ -81,8 +81,9 @@ export function HasFeatureAccess({ featureName, bodyshop, bypass, debug = false
}
return (
bodyshop?.features?.allAccess ||
bodyshop?.features?.[featureName] ||
dayjs(bodyshop?.features[featureName]).isAfter(dayjs())
(typeof bodyshop?.features?.[featureName] === "boolean"
? bodyshop?.features?.[featureName]
: dayjs(bodyshop?.features?.[featureName]).isAfter(dayjs()))
);
}