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 Nov 9, 2022
1 parent 9fcaa24 commit 93eae97
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)
],
err => callback(err)
);
} else {
this.records = {};
this.hooks.readRecords.callAsync(callback);
Expand Down

0 comments on commit 93eae97

Please sign in to comment.