@@ -100,7 +100,10 @@ export function formatIssue(
100100 }
101101 }
102102
103- const issues : Array < { details ?: ( ) => IssueDetailsWithResources , getDetails ?: ( ) => IssueDetailsWithResources } > = [
103+ const issues : Array < {
104+ details ?: ( ) => IssueDetailsWithResources ;
105+ getDetails ?: ( ) => IssueDetailsWithResources ;
106+ } > = [
104107 ...issue . getCorsIssues ( ) ,
105108 ...issue . getMixedContentIssues ( ) ,
106109 ...issue . getGenericIssues ( ) ,
@@ -111,14 +114,16 @@ export function formatIssue(
111114 const affectedResources : Array < {
112115 uid ?: string ;
113116 data ?: object ;
114- request ?: string | number ;
117+ request ?: string | number ;
115118 } > = [ ] ;
116119 for ( const singleIssue of issues ) {
117120 if ( ! singleIssue . details && ! singleIssue . getDetails ) continue ;
118121
119122 let details =
120123 singleIssue . details ?.( ) as unknown as IssueDetailsWithResources ;
121- if ( ! details ) details = singleIssue . getDetails ?.( ) as unknown as IssueDetailsWithResources ;
124+ if ( ! details )
125+ details =
126+ singleIssue . getDetails ?.( ) as unknown as IssueDetailsWithResources ;
122127 if ( ! details ) continue ;
123128
124129 let uid ;
@@ -156,22 +161,25 @@ export function formatIssue(
156161 affectedResources . push ( {
157162 uid,
158163 data : data ,
159- request
160- } ) ;
164+ request,
165+ } ) ;
161166 }
162167 if ( affectedResources . length ) {
163168 result . push ( '### Affected resources' ) ;
164169 }
165170 result . push (
166171 ...affectedResources . map ( item => {
167172 const details = [ ] ;
168- if ( item . uid ) details . push ( `uid=${ item . uid } ` ) ;
169- if ( item . data ) details . push ( `data=${ JSON . stringify ( item . data ) } ` ) ;
170- if ( item . request ) details . push ( ( typeof item . request === 'number' ? `reqid=` : 'url=' ) + item . request ) ;
173+ if ( item . uid ) details . push ( `uid=${ item . uid } ` ) ;
174+ if ( item . data ) details . push ( `data=${ JSON . stringify ( item . data ) } ` ) ;
175+ if ( item . request )
176+ details . push (
177+ ( typeof item . request === 'number' ? `reqid=` : 'url=' ) + item . request ,
178+ ) ;
171179 return details . join ( ' ' ) ;
172180 } ) ,
173181 ) ;
174182 if ( result . length === 0 )
175183 return 'No details provided for the issue ' + issue . code ( ) ;
176184 return result . join ( '\n' ) ;
177- }
185+ }
0 commit comments