File tree 1 file changed +25
-2
lines changed
1 file changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -382,7 +382,7 @@ function _Json_equality(x, y)
382
382
return x . __index === y . __index && _Json_equality ( x . __decoder , y . __decoder ) ;
383
383
384
384
case __1_MAP :
385
- return x . __func === y . __func && _Json_listEquality ( x . __decoders , y . __decoders ) ;
385
+ return x . __func === y . __func && _Json_arrayEquality ( x . __decoders , y . __decoders ) ;
386
386
387
387
case __1_AND_THEN :
388
388
return x . __callback === y . __callback && _Json_equality ( x . __decoder , y . __decoder ) ;
@@ -392,7 +392,7 @@ function _Json_equality(x, y)
392
392
}
393
393
}
394
394
395
- function _Json_listEquality ( aDecoders , bDecoders )
395
+ function _Json_arrayEquality ( aDecoders , bDecoders )
396
396
{
397
397
var len = aDecoders . length ;
398
398
if ( len !== bDecoders . length )
@@ -409,6 +409,29 @@ function _Json_listEquality(aDecoders, bDecoders)
409
409
return true ;
410
410
}
411
411
412
+ function _Json_listEquality ( aDecoders , bDecoders )
413
+ {
414
+ var tempA = aDecoders ;
415
+ var tempB = bDecoders ;
416
+ while ( tempA . b )
417
+ {
418
+ if ( ! tempB . b )
419
+ {
420
+ return false ;
421
+ }
422
+ if ( ! _Json_equality ( tempA . a , tempB . a ) )
423
+ {
424
+ return false ;
425
+ }
426
+ tempA = tempA . b ;
427
+ tempB = tempB . b ;
428
+ }
429
+ if ( tempB . b )
430
+ {
431
+ return false ;
432
+ }
433
+ return true ;
434
+ }
412
435
413
436
// ENCODE
414
437
You can’t perform that action at this time.
0 commit comments