postcss-bidirection icon indicating copy to clipboard operation
postcss-bidirection copied to clipboard

TypeError when the first node is "decl" type

Open erickskrauch opened this issue 4 years ago • 0 comments

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): possible fix

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

erickskrauch avatar Mar 26 '21 01:03 erickskrauch