Skip to content

Commit

Permalink
Remove line breaks from logs in browser console
Browse files Browse the repository at this point in the history
  • Loading branch information
guansss committed Feb 27, 2020
1 parent fb1a4fd commit 6d814e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/utils/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export function log(tag: string, ...messages: any[]) {
count: 1,
});

if (debug) consoleLog(`[${tag}]`, ...messages);
if (debug) consoleLog(`[${tag.replace('\n', '')}]`, ...messages);
}

export function error(tag: string, ...messages: any[]) {
Expand All @@ -76,5 +76,5 @@ export function error(tag: string, ...messages: any[]) {
count: 1,
});

if (debug) consoleError(`[${tag}]`, ...messages);
if (debug) consoleError(`[${tag.replace('\n', '')}]`, ...messages);
}

0 comments on commit 6d814e2

Please sign in to comment.