Skip to content

Commit

Permalink
fix: Resolve "TypeError: Cannot read properties of null (reading 'ser…
Browse files Browse the repository at this point in the history
…vice') at ServerlessInvoker.loadServerlessEvents" when calling invoke (#127)

ensures initializeServerless() runs sequentially as described in #126

fixes #126

Co-authored-by: scott willeke <scott@willeke.com>
  • Loading branch information
wahler and activescott authored May 25, 2023
1 parent 0e2320d commit 5e5a3ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ServerlessInvoker {
const sls = new Serverless(config)
// NOTE: I've seen sls.init() run very slowly; nearly 500ms!
return sls.init().then(() => {
sls.service.load().then(() => {
return sls.service.load().then(() => {
sls.service.setFunctionNames({})
sls.service.mergeArrays()
sls.service.validate()
Expand Down

0 comments on commit 5e5a3ec

Please # to comment.