diff options
Diffstat (limited to 'modern/src/other/ReplayPage.js')
-rw-r--r-- | modern/src/other/ReplayPage.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modern/src/other/ReplayPage.js b/modern/src/other/ReplayPage.js index 1c82c913..9277cee8 100644 --- a/modern/src/other/ReplayPage.js +++ b/modern/src/other/ReplayPage.js @@ -129,8 +129,13 @@ const ReplayPage = () => { const response = await fetch(`/api/positions?${query.toString()}`, { headers }); if (response.ok) { setIndex(0); - setPositions(await response.json()); - setExpanded(false); + const positions = await response.json(); + setPositions(positions); + if (positions.length) { + setExpanded(false); + } else { + throw Error(t('sharedNoData')); + } } else { throw Error(await response.text()); } |