From 05b62973450f93ae636cd96874c18cb44b169029 Mon Sep 17 00:00:00 2001 From: haider Date: Mon, 4 Nov 2024 12:11:11 +0000 Subject: [PATCH] Update handling of data properties and oneOf --- frontend/src/components/ClassExpression.tsx | 7 ++++++- .../IndividualPropertyAssertionsSection.tsx | 20 ++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/ClassExpression.tsx b/frontend/src/components/ClassExpression.tsx index f469bc28d..9cb630d6e 100644 --- a/frontend/src/components/ClassExpression.tsx +++ b/frontend/src/components/ClassExpression.tsx @@ -160,7 +160,7 @@ export default function ClassExpression({ , ]; - for (const subExpr of oneOf) { + for (let subExpr of oneOf) { if (nodes.length > 1) { nodes.push( @@ -168,6 +168,11 @@ export default function ClassExpression({ ); } + + if (typeof subExpr === "number") { + subExpr = subExpr.toString(); + } + nodes.push(   - { - + {typeof v === "string" && v.includes("http") ? ( + @@ -107,7 +107,21 @@ export default function IndividualPropertyAssertionsSection({ linkedEntities={linkedEntities} /> - } + ) : ( + + + + )} ); }