Skip to content

Commit

Permalink
fix: handle pin when its not defined (#5062)
Browse files Browse the repository at this point in the history
  • Loading branch information
keita-determined authored Sep 19, 2022
1 parent 8b8c2c8 commit de9b47c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webui/react/src/components/ExperimentActionDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ const ExperimentActionDropdown: React.FC<Props> = ({
)
.map((action) => {
if (action === Action.SwitchPin) {
const label = settings.pinned[experiment.projectId].includes(id) ? 'Unpin' : 'Pin';
const label = (settings?.pinned[experiment.projectId] ?? []).includes(id) ? 'Unpin' : 'Pin';
return { key: action, label };
} else {
return { danger: action === Action.Delete, key: action, label: action };
Expand Down

0 comments on commit de9b47c

Please sign in to comment.