Skip to content

Commit

Permalink
Bugfix: plotinfo string generation now handles null fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate Lanza committed Sep 3, 2024
1 parent 9d9ee44 commit 4aa0b2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/upset/src/components/custom/PlotInformation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ export const PlotInformation = ({
}

let str: string = '';
if (plotInformation.description !== '') {
if (plotInformation.description) {
str += `This UpSet plot shows ${plotInformation.description}. `;
}
if (plotInformation.sets !== '') {
if (plotInformation.sets) {
str += `The sets are ${plotInformation.sets}. `;
}
if (plotInformation.items !== '') {
if (plotInformation.items) {
str += `The items are ${plotInformation.items}.`;
}

Expand Down

0 comments on commit 4aa0b2c

Please sign in to comment.