Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Commit d38edb4

Browse files
committed
Merge pull request #10225 from NejcZdovc/hotfix/#10223-downloadItem
Fixed null scenario for downloadItem
1 parent 8c686b4 commit d38edb4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/browser/electronDownloadItem.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ module.exports.updateElectronDownloadItem = (win, downloadId, item, state) => {
3232
if (app.dock && state === downloadStates.COMPLETED) {
3333
app.dock.downloadFinished(item.getSavePath())
3434
}
35-
completedBytes += downloadMap[downloadId].getTotalBytes()
35+
36+
if (downloadMap[downloadId] != null) {
37+
completedBytes += downloadMap[downloadId].getTotalBytes()
38+
}
3639
delete downloadMap[downloadId]
3740
} else {
3841
downloadMap[downloadId] = item

0 commit comments

Comments
 (0)