Skip to content

Commit

Permalink
Improve the isValidMap
Browse files Browse the repository at this point in the history
  • Loading branch information
lamnhan066 committed Nov 5, 2024
1 parent 3311d48 commit 001b2c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/src/base/contactor/models/exception.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ class IsolateException implements Exception {

/// Check if the [map] is a valid [IsolateException].
static bool isValidMap(Map<dynamic, dynamic> map) {
return map.containsKey('type') && map['type'] == r'$IsolateException';
return map['type'] == r'$IsolateException';
}
}
4 changes: 1 addition & 3 deletions lib/src/base/contactor/models/isolate_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ enum IsolateState {

/// Check if the [map] is a valid enum.
bool isValidMap(Map<dynamic, dynamic> map) {
return map.containsKey('type') &&
map['type'] == r'$IsolateState' &&
map['value'] == name;
return map['type'] == r'$IsolateState' && map['value'] == name;
}
}

0 comments on commit 001b2c4

Please sign in to comment.