From d76afc623ed5d8f1adb1f54a00dc1223e1b6a31e Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sat, 15 Feb 2020 19:10:15 +0100 Subject: [PATCH] Don't return Promise when it isn't used anyway --- src/stream.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stream.js b/src/stream.js index f528740..2aa022e 100644 --- a/src/stream.js +++ b/src/stream.js @@ -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);