From 079dffce4d6c31abc6b36ef8244b114bec0ec209 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Tue, 20 May 2025 17:16:27 -0700 Subject: [PATCH] IO-3236 HasFeatureAccess Date Signed-off-by: Allan Carr --- .../components/feature-wrapper/feature-wrapper.component.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/components/feature-wrapper/feature-wrapper.component.jsx b/client/src/components/feature-wrapper/feature-wrapper.component.jsx index 7dabea2ac..507a05923 100644 --- a/client/src/components/feature-wrapper/feature-wrapper.component.jsx +++ b/client/src/components/feature-wrapper/feature-wrapper.component.jsx @@ -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())) ); }