Skip to content

Commit 59c6f5d

Browse files
committed
feat: improve name retrieval logic in NodeBadgeComponent for better fallback handling
1 parent 390ff23 commit 59c6f5d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/packages/ce/src/datatype/components/badges/NodeBadgeComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const NodeBadgeComponent: React.FC<NodeBadgeComponentProps> = (props) =>
4646

4747
const name = React.useMemo(() => {
4848
if (definition) {
49-
return definition.names?.[0]?.content ?? definition.__typename === "FunctionDefinition" ? FALLBACK_FUNCTION_NAME : FALLBACK_FLOW_TYPE_NAME
49+
return definition.names?.[0]?.content ?? (definition.__typename === "FunctionDefinition" ? FALLBACK_FUNCTION_NAME : FALLBACK_FLOW_TYPE_NAME)
5050
} else if (isTrigger && node?.__typename === "FlowType") {
5151
return node.names?.[0]?.content ?? FALLBACK_FLOW_TYPE_NAME
5252
}

0 commit comments

Comments
 (0)