Skip to content

Commit 9404173

Browse files
committed
refactor: use nullish coalescing
1 parent 1ff6300 commit 9404173

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ServerlessOffline.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,12 @@ export default class ServerlessOffline {
300300
functionKeys.forEach((functionKey) => {
301301
const functionDefinition = service.getFunction(functionKey)
302302

303-
lambdas.push({ functionDefinition, functionKey })
303+
lambdas.push({
304+
functionDefinition,
305+
functionKey,
306+
})
304307

305-
const events = service.getAllEventsInFunction(functionKey) || []
308+
const events = service.getAllEventsInFunction(functionKey) ?? []
306309

307310
events.forEach((event) => {
308311
const { alb, http, httpApi, schedule, websocket } = event

0 commit comments

Comments
 (0)