Skip to content

Commit ef04418

Browse files
committed
check for whitespace in heading for search results
1 parent cc39639 commit ef04418

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/openneuro-app/src/scripts/search/components/SearchResultItem.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ export const SearchResultItem = ({
131131
const hasEdit = hasEditPermissions(node.permissions, profileSub) || isAdmin
132132
const datasetId = node.id
133133

134-
const heading = node.latestSnapshot.description?.Name
135-
? node.latestSnapshot.description?.Name
136-
: datasetId
134+
const heading = node.latestSnapshot.description?.Name?.trim() || datasetId
137135

138136
const downloads = node.analytics.downloads
139137
? node.analytics.downloads.toLocaleString() + " Downloads \n"

0 commit comments

Comments
 (0)