File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ export interface InAppFeedbackPayload {
7272 /** Text entered by the tester */
7373 text : string ;
7474 /** URIs to download screenshot(s) */
75- screenshotUris ? : string [ ] ;
75+ screenshotUris : string [ ] ;
7676}
7777
7878/**
@@ -330,7 +330,10 @@ export function onInAppFeedbackPublished(
330330 const [ opts , appId ] = getOptsAndApp ( appIdOrOptsOrHandler ) ;
331331
332332 const func = ( raw : CloudEvent < unknown > ) => {
333- return handler ( raw as AppDistributionEvent < InAppFeedbackPayload > ) ;
333+ const event = raw as AppDistributionEvent < InAppFeedbackPayload > ;
334+ // Consolidate the case of empty array and null array
335+ event . data . payload . screenshotUris = event . data . payload . screenshotUris || [ ] ;
336+ return handler ( event ) ;
334337 } ;
335338
336339 func . run = handler ;
You can’t perform that action at this time.
0 commit comments