Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use take instead of first to prevent EmptyError on missing translation #1554

Merged
merged 1 commit into from Dec 18, 2023

Conversation

dhhyi
Copy link
Collaborator

@dhhyi dhhyi commented Dec 13, 2023

PR Type

[x] Bugfix

What Is the Current Behavior?

When translations are missing in both current and fallback language, the FallbackMissingTranslationHandler throws EmptyErrors.

Steps to reproduce:

  1. remove translation key quickorder.page.link in both en_US and de_DE localization files.
  2. visit any page

Actual:
image
and EmptyError in console.

Expected:
image

What Is the New Behavior?

Replaced all first with take(1) as this could happen with other sources, too.

Does this PR Introduce a Breaking Change?

[ ] Yes
[x] No

Other Information

AB#92108

@dhhyi dhhyi added the bug Something isn't working label Dec 13, 2023
@dhhyi dhhyi self-assigned this Dec 13, 2023
@dhhyi dhhyi marked this pull request as ready for review December 13, 2023 12:43
@dhhyi dhhyi removed their assignment Dec 13, 2023
@dhhyi dhhyi requested a review from shauke December 13, 2023 12:43
@SGrueber SGrueber self-requested a review December 18, 2023 10:27
@SGrueber SGrueber self-assigned this Dec 18, 2023
@SGrueber SGrueber added this to the 5.0 milestone Dec 18, 2023
@SGrueber SGrueber merged commit 0904c9e into develop Dec 18, 2023
24 checks passed
@SGrueber SGrueber deleted the fix/missing-translation-fallback-empty branch December 18, 2023 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants