Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove infinite wrapping of withInit #1540

Merged
merged 3 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix bug where 1st gen functions eventually fail with stack too deep (#1540)
Make simple CORS options static for improved debugability (#1536)
2 changes: 1 addition & 1 deletion src/v1/cloud-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ export function makeCloudFunction<EventData>({
service,
triggerResource,
}: MakeCloudFunctionArgs<EventData>): CloudFunction<EventData> {
handler = withInit(handler);
const cloudFunction: any = (data: any, context: any) => {
if (legacyEventType && context.eventType === legacyEventType) {
/*
Expand Down Expand Up @@ -404,7 +405,6 @@ export function makeCloudFunction<EventData>({
context.params = context.params || _makeParams(context, triggerResource);
}

handler = withInit(handler);
let promise;
if (labels && labels["deployment-scheduled"]) {
// Scheduled function do not have meaningful data, so exclude it
Expand Down
Loading