perf(compiler): minor perf tweaks

This commit is contained in:
Evan You
2019-11-15 16:47:55 -05:00
parent 4fef8f342a
commit 51d57b4566
4 changed files with 4 additions and 5 deletions

View File

@@ -552,8 +552,7 @@ function genObjectExpression(node: ObjectExpression, context: CodegenContext) {
}
}
multilines && deindent()
const lastChar = context.code[context.code.length - 1]
push(multilines || /[\])}]/.test(lastChar) ? `}` : ` }`)
push(multilines ? `}` : ` }`)
}
function genArrayExpression(node: ArrayExpression, context: CodegenContext) {