chore: update the note

pull/5370/head
fwx5618177 2 years ago committed by Aniket
parent 486fed5180
commit 3f3a1930ee
  1. 4
      libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx

@ -687,8 +687,8 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
} else if (Array.isArray(x.message)) {
return x.message.map((msg, i) => {
// strictly check condition on 0, false, except undefined, NaN.
// undefined: automatically throw "undefined" is not valid JSON
// NaN: read value from msg is `null`
// if you type `undefined`, terminal automatically throws error, it's error message: "undefined" is not valid JSON
// if you type `NaN`, terminal would give `null`
if (msg === false || msg === 0) msg = msg.toString()
else if (!msg) msg = 'null'
if (React.isValidElement(msg)) {

Loading…
Cancel
Save