From 327cfc562e19bd50b7cfabbae982cb5a144d1172 Mon Sep 17 00:00:00 2001 From: junah201 Date: Wed, 26 Jun 2024 23:16:20 +0900 Subject: [PATCH] fix: Ensure support for when no lambda function (#842) --- lib/inject.js | 4 ++++ 1 file changed, 4 insertions(+) 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();