add quotes for strings in logging.

This commit is contained in:
Miroslav Šedivý 2021-09-09 23:40:33 +02:00
parent ca6bc69630
commit ce88143903

View File

@ -11,7 +11,12 @@ export class Logger {
let t = ''
const args = []
for (const name in fields) {
t += ' %c%s=%c%o'
if (typeof fields[name] === 'string' || fields[name] instanceof String) {
t += ' %c%s=%c"%s"'
} else {
t += ' %c%s=%c%o'
}
args.push('color:#498ad8;', name, '', fields[name])
}