Skip to content

Commit

Permalink
fix: Value of key in map could be whatever
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbadstuebner committed Mar 12, 2024
1 parent 17a1239 commit bcf8f05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/translations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ class Translations {

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

return returnValue;
}
Expand Down

0 comments on commit bcf8f05

Please sign in to comment.