Only detect indent if babel-generator is provided code string, vs multi-source object.

This commit is contained in:
Dale Bustad 2016-03-07 02:35:31 -08:00
parent 288b3ba559
commit 3c6c09d00a

View File

@ -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;
}