diff --git a/site/src/pages/AuditPage/AuditPage.tsx b/site/src/pages/AuditPage/AuditPage.tsx index efcf2068f19ad..fbf12260e57ce 100644 --- a/site/src/pages/AuditPage/AuditPage.tsx +++ b/site/src/pages/AuditPage/AuditPage.tsx @@ -16,6 +16,12 @@ import { AuditPageView } from "./AuditPageView"; const AuditPage: FC = () => { const feats = useFeatureVisibility(); + // The "else false" is required if audit_log is undefined. + // It may happen if owner removes the license. + // + // see: https://github.com/coder/coder/issues/14798 + const isAuditLogVisible = feats.audit_log || false; + const { showOrganizations } = useDashboard(); /** @@ -85,7 +91,7 @@ const AuditPage: FC = () => {