@@ -161,8 +161,8 @@ class TestCaseResult {
161161 this . #createDifImage( this . #testData, testDataRef ) ;
162162 this . #createTestCaseResultErrorMsg( ) ;
163163 let diff = false ;
164- for ( let i = 0 ; i < this . #testData. hashes . length ; i ++ ) {
165- for ( let j = 0 ; j < this . #testData. hashes [ i ] . length ; j ++ ) {
164+ for ( let i = 0 ; i < ( this . #testData. hashes ? .length ?? 0 ) ; i ++ ) {
165+ for ( let j = 0 ; j < ( this . #testData. hashes ?. [ i ] ? .length ?? 0 ) ; j ++ ) {
166166 if ( this . #testData. hashes [ i ] [ j ] != testDataRef . hashes [ i ] [ j ] ) {
167167 this . #cnsl. log (
168168 "" . padEnd ( this . #cnsl. getTestStatusPad ( ) + 5 , " " ) +
@@ -283,10 +283,10 @@ class TestCaseResult {
283283 if ( err ) {
284284 return reject ( err ) ;
285285 }
286- for ( let i = 0 ; i < data . seeks . length ; i ++ ) {
287- for ( let j = 0 ; j < data . seeks [ i ] . length ; j ++ ) {
286+ for ( let i = 0 ; i < ( data . seeks ? .length ?? 0 ) ; i ++ ) {
287+ for ( let j = 0 ; j < ( data . seeks [ i ] ? .length ?? 0 ) ; j ++ ) {
288288 let seek = data . seeks [ i ] [ j ] . replace ( "%" , "" ) . split ( "." ) ;
289- if ( seek . length == 1 ) {
289+ if ( ( seek ? .length ?? 0 ) == 1 ) {
290290 seek . push ( "0" ) ;
291291 }
292292 fs . writeFile (
@@ -328,10 +328,10 @@ class TestCaseResult {
328328 )
329329 )
330330 ) ;
331- for ( let i = 0 ; i < testData . seeks . length ; i ++ ) {
332- for ( let j = 0 ; j < testData . seeks [ i ] . length ; j ++ ) {
331+ for ( let i = 0 ; i < ( testData . seeks ? .length ?? 0 ) ; i ++ ) {
332+ for ( let j = 0 ; j < ( testData . seeks ?. [ i ] ? .length ?? 0 ) ; j ++ ) {
333333 let seek = testData . seeks [ i ] [ j ] . replace ( "%" , "" ) . split ( "." ) ;
334- if ( seek . length == 1 ) {
334+ if ( ( seek ? .length ?? 0 ) == 1 ) {
335335 seek . push ( "0" ) ;
336336 }
337337 const img1 = pngjs . PNG . sync . read (
0 commit comments