Skip to content
This repository was archived by the owner on Apr 14, 2023. It is now read-only.

Commit 6df832f

Browse files
committed
Just provide the error to the callback instead of a new PluginError
1 parent 6198bcb commit 6df832f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ module.exports = function(options) {
2929

3030
return through.obj(function(file, enc, callback) {
3131
if (file.isBuffer()) {
32-
this.emit('error', new gutil.PluginError(PLUGIN_NAME, 'Buffers are not supported'));
33-
return callback(null);
32+
return callback('Buffers are not supported');
3433
}
3534
var p = path.normalize(path.relative(file.cwd, file.path));
3635
if (options.debug) gutil.log(gutil.colors.magenta('processing file: ') + p);

0 commit comments

Comments
 (0)