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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Cannot read property 'proxyOf' of undefined exception from PostCSS #1377

Merged
merged 1 commit into from Nov 27, 2020
Merged

Fix Cannot read property 'proxyOf' of undefined exception from PostCSS #1377

merged 1 commit into from Nov 27, 2020

Conversation

igorkamyshev
Copy link
Contributor

Hello!

Yesterday I tried to migrate https://aviasales.com to PostCSS 8 and Autoprefixer 10 and I found a problem, but I couldn't locate it. @ai show me the place, and I fix it.

postcss/postcss#1473

I thinks, code of this PR is kind of dirty, maybe we should change index() method signature and return -1, if someone pass something unexpected (exactly as Array#indexOf works)?

Actually, I still can not reproduce this error in test-env (it is the reason, why I did not write any new tests), because I do not really understand how this case can be possible. I write this code like a monkey, sorry 馃ぃ

@ai
Copy link
Member

ai commented Nov 25, 2020

Just put above the new lines /* istanbul ignore next */ (or maybe /* istanbul ignore else */ will be better).

@igorkamyshev
Copy link
Contributor Author

I can't write test for this particular case, comment added.

@ai ai merged commit 9e52e87 into postcss:master Nov 27, 2020
@ai
Copy link
Member

ai commented Nov 27, 2020

Thanks. Released in 10.0.4.

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

2 participants