Only detect indent if babel-generator is provided code string, vs multi-source object.
This commit is contained in:
@@ -71,7 +71,7 @@ export class CodeGenerator extends Printer {
|
||||
|
||||
static normalizeOptions(code, opts, tokens) {
|
||||
let style = " ";
|
||||
if (code) {
|
||||
if (code && typeof code === "string") {
|
||||
let indent = detectIndent(code).indent;
|
||||
if (indent && indent !== " ") style = indent;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user