mirror of
https://github.com/System-End/hackatime-desktop.git
synced 2026-04-19 20:55:13 +00:00
fix: handle undefined contentLength in update download event
This commit is contained in:
parent
68ffb2a04e
commit
f8b4d9a434
1 changed files with 1 additions and 1 deletions
|
|
@ -281,7 +281,7 @@ async function downloadAndInstallUpdate() {
|
|||
await update.downloadAndInstall((event) => {
|
||||
switch (event.event) {
|
||||
case 'Started':
|
||||
contentLength = event.data.contentLength;
|
||||
contentLength = event.data.contentLength ?? 0;
|
||||
console.log(`Started downloading ${event.data.contentLength} bytes`);
|
||||
break;
|
||||
case 'Progress':
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue