Skip to content

Commit

Permalink
🦺 don't cast to Map<String, dynamic>
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse committed May 18, 2024
1 parent 5fb8e6c commit 76a2c99
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/src/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ final class Utils {
for (final (int i, dynamic item) in (target as Iterable).indexed)
if (item is! Undefined) i.toString(): item

Check warning on line 131 in lib/src/utils.dart

View check run for this annotation

Codecov / codecov/patch

lib/src/utils.dart#L129-L131

Added lines #L129 - L131 were not covered by tests
}
: Map<String, dynamic>.of(target as Map<String, dynamic>);
: {
for (final MapEntry entry in target.entries)
entry.key.toString(): entry.value
};

return source.entries.fold(mergeTarget, (Map acc, MapEntry entry) {
acc.update(
Expand Down

0 comments on commit 76a2c99

Please sign in to comment.