console: stringify objects
This commit is contained in:
parent
197a0e7082
commit
28958381f4
1 changed files with 7 additions and 0 deletions
|
|
@ -76,6 +76,13 @@ class UiConsole extends UiWidget {
|
|||
|
||||
</osc-console-message>
|
||||
`)
|
||||
|
||||
if (typeof message === 'object') {
|
||||
try {
|
||||
message = JSON.stringify(message)
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
node.textContent = message
|
||||
if (type !== 'error' && node.textContent.match(/error/i)) node.classList.add('error')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue