We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9787021 commit c2f1998Copy full SHA for c2f1998
scripts/build/utils.js
@@ -340,7 +340,6 @@ function rm(dest, opts) {
340
duplex.push(file);
341
cb();
342
}
343
- duplex.push(null); // signal end of read queue
344
};
345
346
const duplex = new Duplex({
@@ -374,15 +373,16 @@ function rm(dest, opts) {
374
373
pending.push(entry);
375
},
376
final(cb) {
+ const endThenCb = () => (duplex.push(null), cb()); // signal end of read queue
377
processDeleted();
378
if (pending.length) {
379
Promise
380
.all(pending.map(entry => entry.promise))
381
.then(() => processDeleted())
382
- .then(() => cb(), cb);
+ .then(() => endThenCb(), endThenCb);
383
return;
384
385
- cb();
+ endThenCb();
386
387
read() {
388
0 commit comments