Don't return Promise when it isn't used anyway

pull/1/head
Sven Slootweg 4 years ago
parent 131e1e643c
commit d76afc623e

@ -5,13 +5,14 @@ const through2 = require("through2");
const assureArray = require("assure-array");
function wrapStreamHandler(stream, handler, callback, item) {
return Promise.try(() => {
Promise.try(() => {
return handler(item);
}).then((result) => {
return assureArray(result);
}).each((newItem) => {
stream.push(newItem);
}).then(() => {
// TODO: Fix the "a promise was created in a handler at [...] but was not returned from it" Bluebird warning that occurs here
callback();
}).catch((err) => {
callback(err);

Loading…
Cancel
Save