Skip to content

Commit

Permalink
Avoid null check on potentially nullable type parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Sep 2, 2022
1 parent fec9a2a commit a705445
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ extension MapExtension<K, V> on Map<K, V> {
/// [key] to the result.
V putOrMerge(K key, V value, V Function(V oldValue, V newValue) merge) =>
containsKey(key)
? this[key] = merge(this[key]!, value)
? this[key] = merge(this[key] as V, value)
: this[key] = value;
}

Expand Down

0 comments on commit a705445

Please sign in to comment.