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: recipe scaler throwing error on empty serving size #4466

Merged

Conversation

Kuchenpirat
Copy link
Collaborator

@Kuchenpirat Kuchenpirat commented Oct 29, 2024

What type of PR is this?

  • bug

What this PR does / why we need it:

The scaler was trying to parse the recipe serving size to determine the numerator / denominator. This moves the check on wheter basic yield is null to before the rounding of the number so we never try to round a null value.

When executed on a null value errors were thrown to the console in production and i had 404 pages pop up for recipes with missing serving sizes in dev.

Which issue(s) this PR fixes:

None

Testing

Verrified issue was no longer present on recipes that were throwing errors manually.

@Kuchenpirat Kuchenpirat merged commit fb0a747 into mealie-next Oct 29, 2024
14 checks passed
@Kuchenpirat Kuchenpirat deleted the fix-scaler-throwing-error-on-empty-serving-size branch October 29, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants