diff --git a/lib/src/base/contactor/models/exception.dart b/lib/src/base/contactor/models/exception.dart index 7148772..854a467 100644 --- a/lib/src/base/contactor/models/exception.dart +++ b/lib/src/base/contactor/models/exception.dart @@ -37,6 +37,6 @@ class IsolateException implements Exception { /// Check if the [map] is a valid [IsolateException]. static bool isValidMap(Map map) { - return map.containsKey('type') && map['type'] == r'$IsolateException'; + return map['type'] == r'$IsolateException'; } } diff --git a/lib/src/base/contactor/models/isolate_state.dart b/lib/src/base/contactor/models/isolate_state.dart index e7854f2..39f0b78 100644 --- a/lib/src/base/contactor/models/isolate_state.dart +++ b/lib/src/base/contactor/models/isolate_state.dart @@ -15,8 +15,6 @@ enum IsolateState { /// Check if the [map] is a valid enum. bool isValidMap(Map map) { - return map.containsKey('type') && - map['type'] == r'$IsolateState' && - map['value'] == name; + return map['type'] == r'$IsolateState' && map['value'] == name; } }