diff --git a/packages/babel-generator/src/buffer.js b/packages/babel-generator/src/buffer.js index 6b6e20d4d0..ebd1be5fda 100644 --- a/packages/babel-generator/src/buffer.js +++ b/packages/babel-generator/src/buffer.js @@ -131,13 +131,13 @@ export default class Buffer { } /** - * Add a space to the buffer unless it is compact (override with force). + * Add a space to the buffer unless it is compact. */ - space(force?: boolean) { - if (!force && this.format.compact) return; + space() { + if (this.format.compact) return; - if (force || this.buf && !this.isLast(" ") && !this.isLast("\n")) { + if (this.buf && !this.isLast(" ") && !this.isLast("\n")) { this.push(" "); } }