Skip to content

Commit

Permalink
fix: only allow string typed tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mfshao committed Jan 14, 2025
1 parent cc60674 commit 3f267b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Discovery/DiscoveryDropdownTagViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const DiscoveryDropdownTagViewer: React.FunctionComponent<DiscoveryTagViewerProp
const tagField = props.config.minimalFieldMapping.tagsListFieldName;
if (study[tagField]) {
study[tagField].forEach((tag) => {
if (tag.category === category.name) {
if (typeof tag.name === 'string' && tag.category === category.name) {
tagMap[tag.name] = 1;
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/Discovery/DiscoveryTagViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const DiscoveryTagViewer: React.FunctionComponent<DiscoveryTagViewerProps> = (pr
const tagField = props.config.minimalFieldMapping.tagsListFieldName;
if (study[tagField]) {
study[tagField].forEach((tag) => {
if (tag.category === category.name) {
if (typeof tag.name === 'string' && tag.category === category.name) {
tagMap[tag.name] = 1;
}
});
Expand Down

0 comments on commit 3f267b2

Please sign in to comment.