From 75d257a3daab80ff62977ca72f47fb76099463c0 Mon Sep 17 00:00:00 2001 From: Dillon Nys Date: Tue, 29 Jun 2021 15:59:28 -0700 Subject: [PATCH] Update logic --- .../lib/src/types/utils/parsers.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/amplify_datastore_plugin_interface/lib/src/types/utils/parsers.dart b/packages/amplify_datastore_plugin_interface/lib/src/types/utils/parsers.dart index ca5bf684e7..013fc31faa 100644 --- a/packages/amplify_datastore_plugin_interface/lib/src/types/utils/parsers.dart +++ b/packages/amplify_datastore_plugin_interface/lib/src/types/utils/parsers.dart @@ -23,4 +23,4 @@ String? enumToString(Object? o) => // only to be used internally by amplify-flutter library T? enumFromString(String? key, List values) => - values.firstWhereOrNull((v) => key == enumToString(v)); + key == null ? null : values.firstWhereOrNull((v) => key == enumToString(v));