Skip to content

Commit

Permalink
Merge pull request #55060 from c3024/add-fallback-for-route-params
Browse files Browse the repository at this point in the history
Add fallback for route params to fix error when there are no params in the link
  • Loading branch information
thienlnam authored Jan 11, 2025
2 parents 5ffe883 + 85d014e commit fdc686a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/ConciergePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function ConciergePage() {
}

// Mark the viewTourTask as complete if we are redirected to Concierge after finishing the Navattic tour
const {navattic} = route.params as {navattic?: string};
const {navattic} = (route.params as {navattic?: string}) ?? {};
if (navattic === CONST.NAVATTIC.COMPLETED) {
if (viewTourTaskReport) {
if (viewTourTaskReport.stateNum !== CONST.REPORT.STATE_NUM.APPROVED || viewTourTaskReport.statusNum !== CONST.REPORT.STATUS_NUM.APPROVED) {
Expand Down

0 comments on commit fdc686a

Please sign in to comment.