diff --git a/lib/inject.js b/lib/inject.js index 12267376..d3dacc7f 100644 --- a/lib/inject.js +++ b/lib/inject.js @@ -99,6 +99,10 @@ function moveModuleUp(source, target, module) { * @return {Promise} the combined promise for requirements injection. */ async function injectAllRequirements(funcArtifact) { + if (this.targetFuncs.length === 0) { + return BbPromise.resolve(); + } + if (this.options.layer) { // The requirements will be placed in a Layer, so just resolve return BbPromise.resolve();