Skip to content

Commit

Permalink
fix: fix cloudevent signature callbacks (#234)
Browse files Browse the repository at this point in the history
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
  • Loading branch information
grant committed Nov 9, 2020
1 parent 01b7df3 commit 2449956
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/invoker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ export function wrapCloudEventFunction(
cloudevent = getBinaryCloudEventContext(req);
cloudevent.data = req.body;
}
// Callback style if user function has more than 2 arguments.
if (userFunction!.length > 2) {
// Callback style if user function has more than 1 argument.
if (userFunction!.length > 1) {
const fn = userFunction as CloudEventFunctionWithCallback;
return fn(cloudevent, callback);
}
Expand Down

0 comments on commit 2449956

Please sign in to comment.