File tree Expand file tree Collapse file tree 6 files changed +9
-8
lines changed Expand file tree Collapse file tree 6 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1+ - Fix bug where some FireAlerts v2 functions didn't correctly return values back to Functions Framework. (#1324 )
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ export function onAlertPublished<T extends { ["@type"]: string } = any>(
215215 const [ opts , alertType , appId ] = getOptsAndAlertTypeAndApp ( alertTypeOrOpts ) ;
216216
217217 const func = ( raw : CloudEvent < unknown > ) => {
218- return wrapTraceContext ( handler ( convertAlertAndApp ( raw ) as AlertEvent < T > ) ) ;
218+ return wrapTraceContext ( handler ) ( convertAlertAndApp ( raw ) as AlertEvent < T > ) ;
219219 } ;
220220
221221 func . run = handler ;
Original file line number Diff line number Diff line change @@ -250,8 +250,8 @@ export function onNewTesterIosDevicePublished(
250250 const [ opts , appId ] = getOptsAndApp ( appIdOrOptsOrHandler ) ;
251251
252252 const func = ( raw : CloudEvent < unknown > ) => {
253- return wrapTraceContext (
254- handler ( convertAlertAndApp ( raw ) as AppDistributionEvent < NewTesterDevicePayload > )
253+ return wrapTraceContext ( handler ) (
254+ convertAlertAndApp ( raw ) as AppDistributionEvent < NewTesterDevicePayload >
255255 ) ;
256256 } ;
257257
@@ -315,8 +315,8 @@ export function onInAppFeedbackPublished(
315315 const [ opts , appId ] = getOptsAndApp ( appIdOrOptsOrHandler ) ;
316316
317317 const func = ( raw : CloudEvent < unknown > ) => {
318- return wrapTraceContext (
319- handler ( convertAlertAndApp ( raw ) as AppDistributionEvent < InAppFeedbackPayload > )
318+ return wrapTraceContext ( handler ) (
319+ convertAlertAndApp ( raw ) as AppDistributionEvent < InAppFeedbackPayload >
320320 ) ;
321321 } ;
322322
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ export function onOperation<T>(
152152 }
153153
154154 const func = ( raw : CloudEvent < unknown > ) => {
155- return wrapTraceContext ( handler ( convertAlertAndApp ( raw ) as BillingEvent < T > ) ) ;
155+ return wrapTraceContext ( handler ) ( convertAlertAndApp ( raw ) as BillingEvent < T > ) ;
156156 } ;
157157
158158 func . run = handler ;
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ export function onTestMatrixCompleted(
190190 const specificOpts = optionsToEndpoint ( optsOrHandler ) ;
191191
192192 const func : any = ( raw : CloudEvent < unknown > ) => {
193- return wrapTraceContext ( handler ( raw as CloudEvent < TestMatrixCompletedData > ) ) ;
193+ return wrapTraceContext ( handler ) ( raw as CloudEvent < TestMatrixCompletedData > ) ;
194194 } ;
195195 func . run = handler ;
196196
Original file line number Diff line number Diff line change @@ -28,6 +28,6 @@ export function wrapTraceContext(
2828 // eslint-disable-next-line prefer-spread
2929 return handler . apply ( null , args ) ;
3030 }
31- traceContext . run ( traceParent , handler , ...args ) ;
31+ return traceContext . run ( traceParent , handler , ...args ) ;
3232 } ;
3333}
You can’t perform that action at this time.
0 commit comments