mirror of
https://github.com/dzeiocom/libs.git
synced 2025-04-23 03:12:12 +00:00
Fixed Undefined and null throwing error
Signed-off-by: Florian Bouillon <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
f35468c497
commit
7e7c006ee6
@ -372,6 +372,12 @@ export default class Logger implements Console {
|
||||
if (typeof el === 'object') {
|
||||
return el
|
||||
}
|
||||
if (el === undefined) {
|
||||
return yellow('undefined')
|
||||
}
|
||||
if (el === null) {
|
||||
return yellow('null')
|
||||
}
|
||||
return typeof el !== 'string' ? yellow(el.toString()) : green(el)
|
||||
})
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user