Skip to content

Commit

Permalink
Update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Dillon Nys committed Jun 29, 2021
1 parent fda91d3 commit 75d257a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ String? enumToString(Object? o) =>

// only to be used internally by amplify-flutter library
T? enumFromString<T>(String? key, List<T> values) =>
values.firstWhereOrNull((v) => key == enumToString(v));
key == null ? null : values.firstWhereOrNull((v) => key == enumToString(v));

0 comments on commit 75d257a

Please sign in to comment.