diff --git a/ui/src/pages/custodian/custodian-session-store.ts b/ui/src/pages/custodian/custodian-session-store.ts index b1263028315e..5e5213c78c34 100644 --- a/ui/src/pages/custodian/custodian-session-store.ts +++ b/ui/src/pages/custodian/custodian-session-store.ts @@ -173,11 +173,11 @@ export class CustodianSessionStore { } get wizardCancelAvailable(): boolean { - const snapshot = this.context?.gateway.snapshot; return ( - snapshot !== undefined && - isGatewayCapabilityAdvertised(snapshot, GATEWAY_SERVER_CAPS.SYSTEM_AGENT_WIZARD_CANCEL) === - true + isGatewayCapabilityAdvertised( + this.context?.gateway.snapshot ?? {}, + GATEWAY_SERVER_CAPS.SYSTEM_AGENT_WIZARD_CANCEL, + ) ?? false ); }