Skip to content

Commit

Permalink
fix: Ensure support for when no lambda function (serverless#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
junah201 committed Jun 26, 2024
1 parent d2e492f commit 327cfc5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 327cfc5

Please sign in to comment.