postcss-bidirection
postcss-bidirection copied to clipboard
TypeError when the first node is "decl" type
This condition fails in the case when the first element has the type decl. This is a common situation when the CSS is written in SCSS/LESS.
https://github.com/gasolin/postcss-bidirection/blob/e15053789ff639a28c7bcdfa948401f4daedec48/index.js#L179-L195
Can be easily fixed by this condition fix (highlighted part):

But it seems a bit ugly. Will be glad to have more stable and right fix.