Skip to content

Commit

Permalink
Remove infinite wrapping of withInit (#1540)
Browse files Browse the repository at this point in the history
* Remove infinite wrapping of withInit

* Changelog
  • Loading branch information
inlined authored Mar 19, 2024
1 parent 0aaedc4 commit ad6cd43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit ad6cd43

Please sign in to comment.