only infer whitespace when we've been passed tokens
This commit is contained in:
parent
688dcec6a3
commit
9d8db74517
@ -197,7 +197,7 @@ export default class Printer extends Buffer {
|
||||
|
||||
let lines = 0;
|
||||
|
||||
if (node.start != null && !node._ignoreUserWhitespace) {
|
||||
if (node.start != null && !node._ignoreUserWhitespace && this.tokens.length) {
|
||||
// user node
|
||||
if (leading) {
|
||||
lines = this.whitespace.getNewlinesBefore(node);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user