Skip to content

Commit 0a70065

Browse files
committed
added null check before calling callback function
1 parent 46ca172 commit 0a70065

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ Deps.prototype.getTransforms = function (file, pkg, opts) {
255255
function loadTransform (id, trOpts, cb) {
256256
var params = { basedir: path.dirname(file) };
257257
nodeResolve(id, params, function nr (err, res, again) {
258-
if (err && again) return cb(err);
258+
if (err && again) return cb && cb(err);
259259

260260
if (err) {
261261
params.basedir = pkg.__dirname;

0 commit comments

Comments
 (0)