Skip to content

Commit

Permalink
fix: fix app crash when no scenarios exist
Browse files Browse the repository at this point in the history
  • Loading branch information
csm-thu committed May 16, 2022
1 parent 5f97a59 commit dcf9cc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/Scenario/Scenario.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const Scenario = (props) => {
rejected: t('views.scenario.validation.rejected', 'Rejected'),
validated: t('views.scenario.validation.validated', 'Validated'),
};
const currentScenarioValidationStatus = currentScenario.data.validationStatus || SCENARIO_VALIDATION_STATUS.UNKNOWN;
const currentScenarioValidationStatus = currentScenario?.data?.validationStatus || SCENARIO_VALIDATION_STATUS.UNKNOWN;
const showValidationChip =
[SCENARIO_VALIDATION_STATUS.DRAFT, SCENARIO_VALIDATION_STATUS.UNKNOWN].includes(currentScenarioValidationStatus) ===
false;
Expand Down

0 comments on commit dcf9cc5

Please sign in to comment.