fix undefined share params allowing access to pages

This commit is contained in:
Francis Cao committed 2026-03-31 15:15:39 -07:00
1 parent fc5edff02d
commit edbb291628
2 files changed
+7 -4

No files matched your search

+2 -1
View File
@@ -27,6 +27,7 @@ const ALL_SECTION_IDS = [
'events',
'sessions',
'realtime',
'performance',
'compare',
'breakdown',
'goals',
@@ -59,7 +60,7 @@ export function ShareProvider({ slug, children }: { slug: string; children: Reac
const isWebsiteShare = share?.shareType === ENTITY_TYPE.website;
const allowedSections = isWebsiteShare && share?.parameters
? ALL_SECTION_IDS.filter(id => share.parameters[id] !== false)
? ALL_SECTION_IDS.filter(id => share.parameters[id] === true)
: [];
const shouldRedirect = isWebsiteShare &&