Don’t use parent#push
ai opened this issue · 5 comments
ai commented
According PostCSS docs, Container#push
is low level method and should not be used by plugins.
This method is for parsers only. It doesn’t contains checks as result it is easy to broke AST by putting wrong nodes.
This line produces broken AST, because it doesn’t set a parent
property.
@geelen You should replace push()
to append()
.
Here is a issue because of this bug: cssnano/cssnano#163 (comment)
ben-eb commented
Can we get this fixed? 👍
geelen commented
Published 1.0.1 as well
ben-eb commented
Thanks!