Print downloaded fix for backup (#6588)

This commit is contained in:
Andrey Sobolev 2024-09-16 21:18:28 +07:00 committed by GitHub
parent ec6b6fb568
commit c3a41ea1bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -609,7 +609,10 @@ export async function backup (
let downloadedMb = 0
let downloaded = 0
const printDownloaded = (msg: string, size: number): void => {
const printDownloaded = (msg: string, size?: number | null): void => {
if (size == null || Number.isNaN(size)) {
return
}
downloaded += size
const newDownloadedMb = Math.round(downloaded / (1024 * 1024))
const newId = Math.round(newDownloadedMb / 10)