Skip to content

Commit

Permalink
Merge pull request #940 from Enase/emty-events
Browse files Browse the repository at this point in the history
Fix for attempt to process undefined events property
  • Loading branch information
dherault committed Mar 25, 2020
2 parents 58bd028 + 5dfad4e commit 9803cb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ServerlessOffline.js
Expand Up @@ -289,7 +289,7 @@ export default class ServerlessOffline {

lambdas.push({ functionKey, functionDefinition })

const events = service.getAllEventsInFunction(functionKey)
const events = service.getAllEventsInFunction(functionKey) || []

events.forEach((event) => {
const { http, httpApi, schedule, websocket } = event
Expand Down

0 comments on commit 9803cb2

Please sign in to comment.