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 multipassCount initialization #1206

Closed
wants to merge 1 commit into from
Closed

Fix multipassCount initialization #1206

wants to merge 1 commit into from

Conversation

dphil
Copy link

@dphil dphil commented Jan 3, 2020

The previous implementation initialized info.multipassCount in the optimize callback, and before counter is incremented. Thus, on the first pass, it is undefined, on the second it is 0, third it is 1, etc.

This is problematic since the prefixIds plugin multipass check will pass for both undefined and 0, causing it to run twice (as opposed to once, which was the intention of this feature to prevent accumulating prefixes).

The first pass receives multipasscount as undefined, the second pass as 0.  This leads to issues due to the prefixIds allowing 2 passes before bailing.
@dphil
Copy link
Author

dphil commented Jan 3, 2020

Duplicate of #1177 , which implements a similar fix for this issue, and adds tests as well.

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.

None yet

1 participant