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: duplicate entries when using min_width or max_width #59

Merged
merged 1 commit into from
Nov 20, 2019

Conversation

sherwinski
Copy link
Contributor

This PR fixes an edge case in the srcset generation logic.

If the min_width option is set to the maximum width possible (8192), then an entry for that width will be generated twice. The same occurs when max_width is set to the minimum srcset width (100).

If the `min_width` is set to the maximum width generated (8192) in srcset
pairs, then the same srcset entry will be generated twice. The same
occurs when `max_width` is set to the minimum width generated (100).
@sherwinski sherwinski requested a review from jayeb November 20, 2019 03:30
@sherwinski sherwinski merged commit c762fc1 into master Nov 20, 2019
@sherwinski sherwinski deleted the fix-min-max-edge-case branch November 20, 2019 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants