Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Feb 6, 2021
1 parent 647aa17 commit 016a5bf
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/stats/DefaultStatsPrinterPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1186,10 +1186,14 @@ class DefaultStatsPrinterPlugin {
}
if (start) {
context[color] = str =>
`${start}${str.replace(
/((\u001b\[39m|\u001b\[22m|\u001b\[0m)+)/g,
`$1${start}`
)}\u001b[39m\u001b[22m`;
`${start}${
typeof str === "string"
? str.replace(
/((\u001b\[39m|\u001b\[22m|\u001b\[0m)+)/g,
`$1${start}`
)
: str
}\u001b[39m\u001b[22m`;
} else {
context[color] = str => str;
}
Expand Down

0 comments on commit 016a5bf

Please sign in to comment.