Skip to content

Commit 2449956

Browse files
authored
fix: fix cloudevent signature callbacks (GoogleCloudPlatform#234)
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
1 parent 01b7df3 commit 2449956

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/invoker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ export function wrapCloudEventFunction(
147147
cloudevent = getBinaryCloudEventContext(req);
148148
cloudevent.data = req.body;
149149
}
150-
// Callback style if user function has more than 2 arguments.
151-
if (userFunction!.length > 2) {
150+
// Callback style if user function has more than 1 argument.
151+
if (userFunction!.length > 1) {
152152
const fn = userFunction as CloudEventFunctionWithCallback;
153153
return fn(cloudevent, callback);
154154
}

0 commit comments

Comments
 (0)