diff --git a/src/ServerlessOffline.js b/src/ServerlessOffline.js index c820c3451..e48b2e900 100644 --- a/src/ServerlessOffline.js +++ b/src/ServerlessOffline.js @@ -300,9 +300,12 @@ export default class ServerlessOffline { functionKeys.forEach((functionKey) => { const functionDefinition = service.getFunction(functionKey) - lambdas.push({ functionDefinition, functionKey }) + lambdas.push({ + functionDefinition, + functionKey, + }) - const events = service.getAllEventsInFunction(functionKey) || [] + const events = service.getAllEventsInFunction(functionKey) ?? [] events.forEach((event) => { const { alb, http, httpApi, schedule, websocket } = event