Skip to content

Commit

Permalink
Merge pull request #9 from jrjohnson/really-fetch-data
Browse files Browse the repository at this point in the history
Use correct event for write stream
  • Loading branch information
jrjohnson authored Mar 30, 2020
2 parents 942a946 + 3c3d984 commit 9b13cd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/get-survey-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async function writeFile(token, url, destinationStream) {
const readStream = await zipFile.openReadStream(entry);
readStream.pipe(destinationStream);
return new Promise(resolve => {
destinationStream.on("end", () => {
destinationStream.on("finish", () => {
resolve();
});
});
Expand Down

0 comments on commit 9b13cd6

Please sign in to comment.