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

(cherry picked from commit fdc686a)

(CP triggered by thienlnam)
  • Loading branch information
thienlnam authored and OSBotify committed Jan 11, 2025
1 parent 3e068d5 commit a5ec396
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 a5ec396

Please sign in to comment.