diff --git a/src/windows/SyncInfo.tsx b/src/windows/SyncInfo.tsx index 9e72b40e..d95e42bd 100644 --- a/src/windows/SyncInfo.tsx +++ b/src/windows/SyncInfo.tsx @@ -90,7 +90,12 @@ export default function SyncInfo({}: ISyncInfoProps) { const currentProgress = (nodeInfo?.blockHeight ?? 0) - (initialKnownBlockheight ?? 0); const numBlocksUntilSynced = (bestBlockheight ?? 0) - (initialKnownBlockheight ?? 0); - let progress = currentProgress / numBlocksUntilSynced; + + let progress = 1; + if (numBlocksUntilSynced > 0) { + progress = currentProgress / numBlocksUntilSynced; + } + if (Number.isNaN(progress)) { progress = 1; }