Skip to content

Commit

Permalink
refactor: use nullish coalescing
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Nov 29, 2022
1 parent 1ff6300 commit 9404173
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ServerlessOffline.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9404173

Please sign in to comment.