Skip to content

Commit

Permalink
fix issue marcglasberg#58
Browse files Browse the repository at this point in the history
  • Loading branch information
Joan S committed Jun 28, 2023
1 parent d6e30af commit 7612b85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/imap/imap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ abstract class IMap<K, V> // ignore: must_be_immutable
/// toJsonK should return String, for safety key null is also implemented
///
Object toJson(Object? Function(K) toJsonK, Object? Function(V) toJsonV) =>
unlock.map((key, value) => MapEntry(
key == null ? 'null' : (toJsonK(key) as String), toJsonV(value)));
unlock.map((key, value) =>
MapEntry(toJsonK(key)?.toString() ?? 'null', toJsonV(value)));

/// See also: [ImmutableCollection], [ImmutableCollection.lockConfig],
/// [ImmutableCollection.isConfigLocked],[flushFactor], [defaultConfig]
Expand Down

0 comments on commit 7612b85

Please sign in to comment.