File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,12 @@ import { AuditPageView } from "./AuditPageView";
16
16
17
17
const AuditPage : FC = ( ) => {
18
18
const feats = useFeatureVisibility ( ) ;
19
+ // The "else false" is required if audit_log is undefined.
20
+ // It may happen if owner removes the license.
21
+ //
22
+ // see: https://github.com/coder/coder/issues/14798
23
+ const isAuditLogVisible = feats . audit_log || false ;
24
+
19
25
const { showOrganizations } = useDashboard ( ) ;
20
26
21
27
/**
@@ -85,7 +91,7 @@ const AuditPage: FC = () => {
85
91
< AuditPageView
86
92
auditLogs = { auditsQuery . data ?. audit_logs }
87
93
isNonInitialPage = { isNonInitialPage ( searchParams ) }
88
- isAuditLogVisible = { feats . audit_log }
94
+ isAuditLogVisible = { isAuditLogVisible }
89
95
auditsQuery = { auditsQuery }
90
96
error = { auditsQuery . error }
91
97
showOrgDetails = { showOrganizations }
You can’t perform that action at this time.
0 commit comments