Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we do the lookup all the time, even if it's not needed because returnValue != null

if (maybeValue is String) returnValue ??= maybeValue;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need a unittest for the new behavior


return returnValue;
}
Expand Down