diff --git a/lib/src/map_from_uri.dart b/lib/src/map_from_uri.dart index 97f1d56c..0945ce6b 100644 --- a/lib/src/map_from_uri.dart +++ b/lib/src/map_from_uri.dart @@ -25,7 +25,7 @@ buildMapFromUri(Map map, String body) { // i.e. map.foo.bar => [map, foo, bar] List keys = key.split('.'); - Map targetMap = map[keys[0]] ?? {}; + Map targetMap = map[keys[0]] != null ? map[keys[0]] as Map : {}; map[keys[0]] = targetMap; for (int i = 1; i < keys.length; i++) { if (i < keys.length - 1) {