Skip to content

Commit

Permalink
fix: detect importId
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed May 29, 2024
1 parent 24504da commit 3e87ccb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/SnapshotPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ onMounted(async () => {
const importId: number | null = await fetch(
'https://detect.gkd.li/api/getImportId?id=' + snapshotId.value,
).then((r) => r.json());
if (importId) {
if (importId && Number.isSafeInteger(importId)) {
router.replace({
path: '/i/' + importId,
query: route.query,
});
return;
}
message.error(`快照数据缺失`);
} finally {
loadingBar.finish();
}
message.error(`快照数据缺失`);
return;
}
setTimeout(() => {
Expand Down

0 comments on commit 3e87ccb

Please sign in to comment.