Skip to content

Commit b176eb6

Browse files
committed
fix(serverless): Check if cloud event callback is a function (#9044)
1 parent a2abb7a commit b176eb6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/google-cloud-serverless/src/gcpfunction/cloud_events.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ function _wrapCloudEventFunction(
5656
DEBUG_BUILD && logger.error(e);
5757
})
5858
.then(() => {
59-
callback(...args);
59+
if (typeof callback === 'function') {
60+
callback(...args);
61+
}
6062
});
6163
});
6264

0 commit comments

Comments
 (0)