You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
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.
The text was updated successfully, but these errors were encountered:
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 onbracket/frontend/src/pages/tournaments/[id]/swiss/[stage_item_id].tsx
Line 78 in 48ba51a
bracket/frontend/src/pages/tournaments/[id]/swiss/[stage_item_id].tsx
Lines 78 to 82 in 48ba51a
useState
hook rather than define them usinglet
and implementing another if check to validate that the correct data is queried.The text was updated successfully, but these errors were encountered: