1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-08 12:40:26 +00:00

[PM-27291] Fix critical apps not being preserved after org change

PR #17053 broke the critical app preservation logic from PR #17008 by
removing the null check in the report state scan operator. This caused
critical app flags to be lost when currState.data was null.

Restored the original logic: only update data if currState.data is
non-null, otherwise preserve prevState.data.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude
2025-10-29 22:06:06 +00:00
parent 51a557514f
commit 3268bfd8ef

View File

@@ -726,7 +726,7 @@ export class RiskInsightsOrchestratorService {
scan((prevState: ReportState, currState: ReportState) => ({
...prevState,
...currState,
data: currState.data,
data: currState.data !== null ? currState.data : prevState.data,
})),
startWith({ loading: false, error: null, data: null }),
shareReplay({ bufferSize: 1, refCount: true }),