Skip to content

Commit

Permalink
Merge pull request #1591 from SynBioHub/fixEditTypes
Browse files Browse the repository at this point in the history
Fix problem with editing types
  • Loading branch information
cjmyers authored Dec 17, 2024
2 parents bbe6b3a + 3cdbc1f commit 1f82cf9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/summarize/summarizeComponentDefinition.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ function summarizeComponentDefinition (componentDefinition, req, sbol, remote, g
}

function sortTypes (a, b) {
if ((a.description && !b.description) ||
(!a.description && !b.description && a.uri.toLowerCase() < b.uri.toLowerCase()) ||
(a.description && b.description && a.description.name.toLowerCase() < b.description.name.toLowerCase()) ||
(a.description && b.description && a.description.name.toLowerCase() === b.description.name.toLowerCase() && a.uri.toLowerCase() < b.uri.toLowerCase())) {
if ((a.description.name && !b.description.name) ||
(!a.description.name && !b.description.name && a.uri.toLowerCase() < b.uri.toLowerCase()) ||
(a.description.name && b.description.name && a.description.name.toLowerCase() < b.description.name.toLowerCase()) ||
(a.description.name && b.description.name && a.description.name.toLowerCase() === b.description.name.toLowerCase() && a.uri.toLowerCase() < b.uri.toLowerCase())) {
return -1
} else {
return 1
Expand Down
2 changes: 1 addition & 1 deletion lib/type.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function lookupType (uri) {
return {
uri: uri,
term: uri,
description: uri
description: { name: uri }
}
}

Expand Down

0 comments on commit 1f82cf9

Please sign in to comment.