Skip to content

Commit 327cfc5

Browse files
committed
fix: Ensure support for when no lambda function (serverless#842)
1 parent d2e492f commit 327cfc5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/inject.js

+4
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ function moveModuleUp(source, target, module) {
9999
* @return {Promise} the combined promise for requirements injection.
100100
*/
101101
async function injectAllRequirements(funcArtifact) {
102+
if (this.targetFuncs.length === 0) {
103+
return BbPromise.resolve();
104+
}
105+
102106
if (this.options.layer) {
103107
// The requirements will be placed in a Layer, so just resolve
104108
return BbPromise.resolve();

0 commit comments

Comments
 (0)