diff --git a/packages/amis-core/src/utils/debug.tsx b/packages/amis-core/src/utils/debug.tsx index 06de32844ec..c4682b72641 100644 --- a/packages/amis-core/src/utils/debug.tsx +++ b/packages/amis-core/src/utils/debug.tsx @@ -102,21 +102,25 @@ const LogView = observer(({store}: {store: AMISDebugStore}) => { return ( <> {logs.map((log, index) => { + let ext = + typeof log.ext === 'string' && + (log.ext.startsWith('{') || log.ext.startsWith('[')) + ? parseJson(log.ext) + : typeof log.ext === 'object' + ? parseJson(JSON.stringify(log.ext)) + : log.ext; + return (
[{log.cat}] {log.msg}
- {(typeof log.ext === 'string' && - (log.ext.startsWith('{') || log.ext.startsWith('['))) || - typeof log.ext === 'object' ? ( + {typeof ext === 'object' ? ( Loading...
}> { /> ) : ( -
{JSON.stringify(log.ext)}
+
{JSON.stringify(ext)}
)} );