Skip to content

Commit

Permalink
feat(downloader): add onData hook support
Browse files Browse the repository at this point in the history
  • Loading branch information
nurrony committed Mar 20, 2024
1 parent 8a5f2d4 commit d5d2bf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ class Downloader {
writeStream.on('finish', () => {
writeStream.close();
if (this.onData) {
this.onData(item, this.items.length, filePath);
this.onData({ item: item, total: this.items.length, path: filePath });
}
resolve('success');
});
Expand Down

0 comments on commit d5d2bf0

Please sign in to comment.