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(dye): handle fallbackColor correctly and add regression test #51

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

supitsdu
Copy link
Owner

@supitsdu supitsdu commented Nov 6, 2024

This PR fixes an issue in the dye function where the fallbackColor options was not being handled as expected during instantiation. The function now properly applies the fallbackColor when the input color cannot be parsed.

Changes

  • Modified the dye function to apply fallbackColor (RGB only) when the main color parsing fails.
  • Added unit tests to ensure the fallbackColor is applied correctly and to prevent regression.

Notes

  • This fix addresses the issue in Release 2.0.0 The new tests should ensure that the fallbackColor handling remains intact in future updates.

@supitsdu supitsdu added 🐛 Bug Something isn't working ✅ Tests Apply this label to PRs or issues related to adding, updating, or fixing tests Fixes labels Nov 6, 2024
@supitsdu supitsdu self-assigned this Nov 6, 2024
@supitsdu supitsdu merged commit f4c5b88 into main Nov 6, 2024
2 checks passed
@supitsdu supitsdu deleted the fix/dye-fallback-color-handling branch November 6, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working Fixes ✅ Tests Apply this label to PRs or issues related to adding, updating, or fixing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant