Skip to content

Commit c6da10b

Browse files
fix: Value of key in map could be whatever
1 parent c818108 commit c6da10b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/src/translations.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ class Translations {
1313

1414
/// If we failed to find the key as a nested key, then fall back
1515
/// to looking it up like normal.
16-
returnValue ??= _translations?[key];
16+
var maybeValue = _translations?[key];
17+
if (maybeValue is String) returnValue ??= maybeValue;
1718

1819
return returnValue;
1920
}

0 commit comments

Comments
 (0)