Skip to content

Commit

Permalink
fix: Add proper callback handling to Compiler readRecords function
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Zook committed Sep 27, 2022
1 parent 9fcaa24 commit 298e186
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/Compiler.js
Expand Up @@ -970,10 +970,13 @@ ${other}`);
readRecords(callback) {
if (this.hooks.readRecords.isUsed()) {
if (this.recordsInputPath) {
asyncLib.parallel([
cb => this.hooks.readRecords.callAsync(cb),
this._readRecords.bind(this)
]);
asyncLib.parallel(
[
cb => this.hooks.readRecords.callAsync(cb),
this._readRecords.bind(this)
],
callback
);
} else {
this.records = {};
this.hooks.readRecords.callAsync(callback);
Expand Down

0 comments on commit 298e186

Please sign in to comment.