Merge branch 'master' into monacoverUpdate

pull/4010/head
Aniket 1 year ago committed by GitHub
commit 994b70c340
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx

@ -686,7 +686,11 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
})
} else if (Array.isArray(x.message)) {
return x.message.map((msg, i) => {
if (!msg) msg = 'null'
// strictly check condition on 0, false, except undefined, NaN.
// 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)) {
return (
<div className="px-4 block" data-id="block" key={i}>

Loading…
Cancel
Save