Skip to content

Commit 43e6db9

Browse files
committed
FLPATH-4244 | [DCM] Normalize policy enabled checks for defensive coding
1 parent 3f2ebbc commit 43e6db9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

workspaces/dcm/plugins/dcm/src/pages/policies/PoliciesTabContent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export function PoliciesTabContent() {
172172
title: 'Enabled',
173173
field: 'enabled',
174174
render: p => {
175-
const isEnabled = p.enabled === true;
175+
const isEnabled = p.enabled ?? true;
176176
return (
177177
<Chip
178178
label={isEnabled ? 'Yes' : 'No'}
@@ -204,7 +204,7 @@ export function PoliciesTabContent() {
204204
render: p => {
205205
const id = p.id ?? '';
206206
const isToggling = togglingIds.has(id);
207-
const isEnabled = p.enabled !== false;
207+
const isEnabled = p.enabled ?? true;
208208
return (
209209
<Box className={classes.actionsCellBox}>
210210
<Tooltip

0 commit comments

Comments
 (0)