Skip to content

Commit

Permalink
fixed NodeDefs.getDescription: do not return name if empty (#239)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefano Ricci <[email protected]>
  • Loading branch information
SteRiccio and SteRiccio authored Aug 26, 2024
1 parent 5adeec0 commit 7fe597e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nodeDef/nodeDefs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const getLabelOrName = (nodeDef: NodeDef<NodeDefType, NodeDefProps>, lang: Langu
Strings.defaultIfEmpty(getName(nodeDef))(nodeDef.props.labels?.[lang])

const getDescription = (nodeDef: NodeDef<NodeDefType, NodeDefProps>, lang: LanguageCode): string =>
Strings.defaultIfEmpty(getName(nodeDef))(nodeDef.props.descriptions?.[lang])
nodeDef.props.descriptions?.[lang] ?? ''

const isReadOnly = (nodeDef: NodeDef<any>): boolean => nodeDef.props.readOnly ?? false

Expand Down

0 comments on commit 7fe597e

Please sign in to comment.