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 @@ -380,7 +380,7 @@ function _Json_equality(x, y)
380
380
return x . __index === y . __index && _Json_equality ( x . __decoder , y . __decoder ) ;
381
381
382
382
case __1_MAP :
383
- return x . __func === y . __func && _Json_listEquality ( x . __decoders , y . __decoders ) ;
383
+ return x . __func === y . __func && _Json_arrayEquality ( x . __decoders , y . __decoders ) ;
384
384
385
385
case __1_AND_THEN :
386
386
return x . __callback === y . __callback && _Json_equality ( x . __decoder , y . __decoder ) ;
@@ -390,7 +390,7 @@ function _Json_equality(x, y)
390
390
}
391
391
}
392
392
393
- function _Json_listEquality ( aDecoders , bDecoders )
393
+ function _Json_arrayEquality ( aDecoders , bDecoders )
394
394
{
395
395
var len = aDecoders . length ;
396
396
if ( len !== bDecoders . length )
@@ -407,6 +407,29 @@ function _Json_listEquality(aDecoders, bDecoders)
407
407
return true ;
408
408
}
409
409
410
+ function _Json_listEquality ( aDecoders , bDecoders )
411
+ {
412
+ var tempA = aDecoders ;
413
+ var tempB = bDecoders ;
414
+ while ( tempA . b )
415
+ {
416
+ if ( ! tempB . b )
417
+ {
418
+ return false ;
419
+ }
420
+ if ( ! _Json_equality ( tempA . a , tempB . a ) )
421
+ {
422
+ return false ;
423
+ }
424
+ tempA = tempA . b ;
425
+ tempB = tempB . b ;
426
+ }
427
+ if ( tempB . b )
428
+ {
429
+ return false ;
430
+ }
431
+ return true ;
432
+ }
410
433
411
434
// ENCODE
412
435
You can’t perform that action at this time.
0 commit comments