File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -194,19 +194,16 @@ const processAccessibilityReport = async (windowNew) => {
194194 if ( captureScreenshot ) {
195195 if ( scanData && scanData . data && scanData . data . length > 0 && globalScreenshots ) {
196196 const firstDataItem = scanData . data [ 0 ] ;
197+
198+ // Extension always provides screenshotId and screenBound in each issue
199+ // Get screenshotId from the first issue to use the extension's ID
197200 if ( firstDataItem . events && firstDataItem . events . length > 0 ) {
198201 const firstEvent = firstDataItem . events [ 0 ] ;
199- if ( firstEvent . issues && firstEvent . issues . length > 0 ) {
200- // Update screenshotId with the actual screenshotId
201- globalScreenshots [ 0 ] . screenshotId = firstEvent . issues [ 0 ] . screenshotId ;
202- }
203- }
204- for ( let i = 0 ; i < scanData . data . length ; i ++ ) {
205- if ( scanData . data [ i ] . screenshots && Array . isArray ( scanData . data [ i ] . screenshots ) ) {
206- scanData . data [ i ] . screenshots = globalScreenshots ;
207- break ;
202+ if ( firstEvent . issues && firstEvent . issues . length > 0 && firstEvent . issues [ 0 ] . screenshotId ) {
203+ globalScreenshots [ 0 ] . screenshotId = firstEvent . issues [ 0 ] . screenshotId ;
208204 }
209205 }
206+ scanData . data [ 0 ] . screenshots = globalScreenshots ;
210207 }
211208 globalScreenshots = null ;
212209 }
You can’t perform that action at this time.
0 commit comments