Skip to content

Commit

Permalink
refactor: simplify boolean null handling
Browse files Browse the repository at this point in the history
  • Loading branch information
nicole-eb committed Mar 4, 2025
1 parent 4adcd9d commit b4539d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/enmeshed/lib/account/contacts/request_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class _RequestScreenState extends State<RequestScreen> {
builder: (context) => CreateRelationshipErrorDialog(errorCode: validateRelationshipCreationResponse.errorCode!),
);

if (result != null && result) await _deleteRequest();
if (result ?? false) await _deleteRequest();

if (mounted) context.pop();

Expand Down
2 changes: 1 addition & 1 deletion apps/enmeshed/lib/core/widgets/request_dvo_renderer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class _RequestDVORendererState extends State<RequestDVORenderer> {
Future<void> _onAcceptButtonPressed() async {
final canCreateRelationship = await widget.validateCreateRelationship?.call();

if (canCreateRelationship != null && !canCreateRelationship) return;
if (canCreateRelationship == false) return;

await _acceptRequest();
}
Expand Down

0 comments on commit b4539d1

Please sign in to comment.