From 3f3a1930ee6087bc73078d0f0449ae80f6c20127 Mon Sep 17 00:00:00 2001 From: fwx5618177 <279357596@qq.com> Date: Mon, 28 Aug 2023 11:08:22 +0800 Subject: [PATCH] chore: update the note --- libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx index a1bb227fa1..a5e1e95ab1 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx +++ b/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)) {