From 849f5cc92f374c39c90149988607da2739bed48c Mon Sep 17 00:00:00 2001 From: moritalous Date: Sat, 20 Jun 2026 23:09:37 +0000 Subject: [PATCH] fix: resolve type error in SchemaDisplayPath dangerouslySetInnerHTML children (ReactNode) was passed directly to dangerouslySetInnerHTML's __html, which requires string | TrustedHTML, causing a build-time type error. Render children normally and reserve HTML injection for the default highlighted path. Co-Authored-By: Claude Opus 4.8 --- packages/elements/src/schema-display.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/elements/src/schema-display.tsx b/packages/elements/src/schema-display.tsx index d3d4c691..18a63c6c 100644 --- a/packages/elements/src/schema-display.tsx +++ b/packages/elements/src/schema-display.tsx @@ -103,11 +103,19 @@ export const SchemaDisplayPath = ({ '{$1}' ); + if (children) { + return ( + + {children} + + ); + } + return ( );