From ccc835caff0344baad3c92ce786ad4f804bf667b Mon Sep 17 00:00:00 2001 From: Evan You Date: Sat, 3 Nov 2018 05:59:29 +0900 Subject: [PATCH] chore: fix warning indent --- packages/runtime-core/src/warning.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/runtime-core/src/warning.ts b/packages/runtime-core/src/warning.ts index deea72d2..4bc22a06 100644 --- a/packages/runtime-core/src/warning.ts +++ b/packages/runtime-core/src/warning.ts @@ -31,7 +31,8 @@ export function warn(msg: string, ...args: any[]) { console.groupCollapsed('at', ...formatTraceEntry(trace[0])) const logs: string[] = [] trace.slice(1).forEach((entry, i) => { - logs.push('\n', ...formatTraceEntry(entry, i + 1)) + if (i !== 0) logs.push('\n') + logs.push(...formatTraceEntry(entry, i + 1)) }) console.log(...logs) console.groupEnd()