Skip to content

Commit 56870d5

Browse files
committed
fix(content_management): handle null values in DraftSourcesState
- Update DraftSourcesState.copyWith constructor to handle null values - Ensure lastPendingDeletionId and snackbarSourceTitle retain their current values if null is passed
1 parent bb2a71e commit 56870d5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/content_management/bloc/draft_sources/draft_sources_state.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ class DraftSourcesState extends Equatable {
8282
// to ensure they are cleared after being handled.
8383
exception: exception,
8484
publishedSource: publishedSource,
85-
lastPendingDeletionId: lastPendingDeletionId,
86-
snackbarSourceTitle: snackbarSourceTitle,
85+
lastPendingDeletionId:
86+
lastPendingDeletionId ?? this.lastPendingDeletionId,
87+
snackbarSourceTitle: snackbarSourceTitle ?? this.snackbarSourceTitle,
8788
);
8889
}
8990

0 commit comments

Comments
 (0)