Skip to content

Commit 12f2093

Browse files
committed
Convert errorAndCallback ternary to arrow function
1 parent 4b2b1ad commit 12f2093

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/Compilation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,13 +362,13 @@ class Compilation extends Tapable {
362362
_addModuleChain(context, dependency, onModule, callback) {
363363
const start = this.profile && Date.now();
364364

365-
const errorAndCallback = this.bail ? function errorAndCallback(err) {
365+
const errorAndCallback = this.bail ? (err) => {
366366
callback(err);
367-
} : function errorAndCallback(err) {
367+
} : (err) => {
368368
err.dependencies = [dependency];
369369
this.errors.push(err);
370370
callback();
371-
}.bind(this);
371+
}
372372

373373
if(typeof dependency !== "object" || dependency === null || !dependency.constructor) {
374374
throw new Error("Parameter 'dependency' must be a Dependency");

0 commit comments

Comments
 (0)