Merge pull request #858 from ky-is/fix-formatcss

Fix format for empty root nodes case
This commit is contained in:
Adam Wathan 2019-04-20 11:22:11 -04:00 committed by GitHub
commit e9b4014131
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,5 +11,7 @@ function indentRecursive(node, indent = 0) {
export default function formatNodes(root) {
indentRecursive(root)
root.first.raws.before = ''
if (root.first) {
root.first.raws.before = ''
}
}