Skip to content

Commit

Permalink
Plots tab option validation did not allow for the "none" selected value
Browse files Browse the repository at this point in the history
  • Loading branch information
alisman committed Nov 15, 2022
1 parent 68fd100 commit ee7f161
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/pages/resultsView/plots/PlotsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -795,14 +795,16 @@ export default class PlotsTab extends React.Component<IPlotsTabProps, {}> {

// due to legacy urls, it's possible that selections can be made which
// are no longer avaiable. this handles that case
const selectedDataTypeDoesNotExists = !_.some(
const selectedDataTypeDoesNotExist = !_.some(
dataTypeOptions,
o => o.value === this._dataType
o =>
this._dataType === NONE_SELECTED_OPTION_STRING_VALUE ||
o.value === this._dataType
);

if (
(this._dataType === undefined && dataTypeOptions.length) ||
selectedDataTypeDoesNotExists
selectedDataTypeDoesNotExist
) {
// return computed default if _dataType is undefined and if there are options to select a default value from
if (
Expand Down

0 comments on commit ee7f161

Please sign in to comment.