Skip to content

Conversation

@cmrn
Copy link
Contributor

@cmrn cmrn commented Jun 4, 2025

Just noticed a flaw with my previous PR #56 - RegExp.prototype.exec will return null if no match is found. Previously this wouldn't cause an error since the while statement would skip if matches was null. Now it will throw a TypeError: object null is not iterable when destructuring the result.

This PR prevents this error, and instead emits a postcss warning if the @value statement couldn't be parsed. This matches the behavior of postcss-modules-values as described in this test.

@princed princed merged commit cac20c0 into princed:master Jun 5, 2025
2 checks passed
@princed
Copy link
Owner

princed commented Jun 5, 2025

Very thorough approach, thank you!
Out as 4.2.2

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