Possible oversight when rendering Swiss matches.
The page to view Swiss matches might include a slight oversight wherein it seems to assume that stageItem will always succeed. I see that there is an if check on https://github.com/evroon/bracket/blob/48ba51a3e72be7868d2b327d2393c6fb4812b7cd/frontend/src/pages/tournaments/%5Bid%5D/swiss/%5Bstage_item_id%5D.tsx#L78 before fetching additional data but the latter half of the if check is useless as Next will always assure a non-nullable value, and it doesn't actually check that the data exists in the DB to begin with. When a page is requested with an ID that doesn't exist in https://github.com/evroon/bracket/blob/48ba51a3e72be7868d2b327d2393c6fb4812b7cd/frontend/src/pages/tournaments/%5Bid%5D/swiss/%5Bstage_item_id%5D.tsx#L78-L82 it attempts to query further data, but it fails causing an error to be bubbled up. I would propose moving up the if check, removing the latter half of the check, making the variables defined use the useState hook rather than define them using let and implementing another if check to validate that the correct data is queried.
This issue is stale because it has been open for 60 days with no activity. What is the action to take here?
This issue is stale because it has been open for 60 days with no activity. What is the action to take here?