Skip to content

Commit

Permalink
1. Removed req.end(), fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
bearjaws committed Jun 15, 2023
1 parent 5875c80 commit b26a606
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/wget.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function download(src, output, options, parentEvent, redirects = 0) {
};
}
let srcUrl = url.parse(src);
if (!srcUrl.protocol || srcUrl.prototype === null) {
if (!srcUrl.protocol || srcUrl.protocol === null) {
downloader.emit(
'error',
'Cannot parse url protocol for ' +
Expand Down Expand Up @@ -126,7 +126,6 @@ function download(src, output, options, parentEvent, redirects = 0) {
writeStream.end();
downloader.emit('progress', 1);
downloader.emit('end', 'Finished writing to disk');
req.end();
});
} else if (!handledCodes.includes(res.statusCode)) {
downloader.emit(
Expand Down

0 comments on commit b26a606

Please sign in to comment.