Each then() should return a value or throw Firebase cloud functions

后端 未结 3 903
青春惊慌失措
青春惊慌失措 2020-11-30 12:57

I am writing a cloud function for firebase using javascript but I am stuck, I don\'t know the exact meaning of error and unable to solve it.. The error states: 27:65 error

3条回答
  •  -上瘾入骨i
    2020-11-30 13:02

    That's jslinting telling you that each .then must include a return value. In other words, avoid promise anti pattern.

    You might find async functions easier to wrap your head around. Note that you'll need to run the Node 8 runtime for async support though...

提交回复
热议问题