Skip to content

Commit 1992ff6

Browse files
authored
[sentiment] Simplify arrow functions (#214)
* [sentiment] Simplify arrow functions
1 parent 1df985a commit 1992ff6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

sentiment/data.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,9 @@ async function maybeDownload(sourceURL, destPath) {
105105
https.get(sourceURL, response => {
106106
response.pipe(localZipFile);
107107
localZipFile.on('finish', () => {
108-
localZipFile.close(async () => {
109-
return resolve();
110-
});
111-
});
112-
localZipFile.on('error', err => {
113-
return reject(err);
108+
localZipFile.close(() => resolve());
114109
});
110+
localZipFile.on('error', err => reject(err));
115111
});
116112
} else {
117113
return resolve();

0 commit comments

Comments
 (0)