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

change order of transformers, put function below the guard #1110

Merged
merged 1 commit into from
Dec 29, 2023

Conversation

alextes90
Copy link
Contributor

@alextes90 alextes90 commented Dec 15, 2023

Have faced with the error, when use keepOnlyAttributeSizes. The error was attrStr.split is not a function. After investigation has found that the error coms from transformers => removeInlineSizes.js => parseAttrs => _attr => parseAtr. The reason was that transformer removeUnusedCSS remove classes and leave class attribute as is. And than while parsing not the string was the argument but the boolean, wich caused the error.
So I change the order of transformers so after the removeInlineCSS will invoke removeAttributes wich will remove single class attribute.
Also while investigating has found that there is sense to move parsing below the guard in removeInlineSizes.js to prevent some unnecessary operations.

@cossssmin
Copy link
Member

Hey, thanks for this! I'll need to run some more checks to make sure it doesn't break anything else (even though tests are passing right now) 👍

@cossssmin cossssmin merged commit 509a8e5 into maizzle:master Dec 29, 2023
3 checks passed
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