File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import Timer from "timer";
22
22
import deepEqual from "deepEqual" ;
23
23
import structuredClone from "structuredClone" ;
24
24
import Base64 from "base64" ;
25
+ import Hex from "hex" ;
25
26
import Modules from "modules" ;
26
27
import fetch from "fetch" ;
27
28
import { Headers , URLSearchParams } from "fetch" ;
@@ -343,13 +344,16 @@ class DebugNode extends Node {
343
344
this . #statusVal = config . statusVal ;
344
345
}
345
346
onMessage ( msg ) {
346
- const value = this . #getter( msg ) ?? msg ; //@@ temporary workaround for nodered2mcu bug ("complete msg object" returns undefined)
347
+ let value = this . #getter( msg ) ;
347
348
348
- if ( this . #console)
349
+ if ( this . #console) {
350
+ if ( value instanceof Uint8Array )
351
+ value = Hex . toString ( value ) ;
349
352
trace ( ( "object" === typeof value ) ? JSON . stringify ( value ) : value , "\n" ) ;
353
+ }
350
354
351
355
if ( this . #sidebar) {
352
- let value = this . #property ? { [ this . #property] : value } : msg ;
356
+ value = this . #property ? { [ this . #property] : value } : msg ;
353
357
value = {
354
358
...value ,
355
359
source : {
You can’t perform that action at this time.
0 commit comments