File tree Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Expand file tree Collapse file tree 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)
382382 return x . __index === y . __index && _Json_equality ( x . __decoder , y . __decoder ) ;
383383
384384 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 ) ;
386386
387387 case __1_AND_THEN :
388388 return x . __callback === y . __callback && _Json_equality ( x . __decoder , y . __decoder ) ;
@@ -392,7 +392,7 @@ function _Json_equality(x, y)
392392 }
393393}
394394
395- function _Json_listEquality ( aDecoders , bDecoders )
395+ function _Json_arrayEquality ( aDecoders , bDecoders )
396396{
397397 var len = aDecoders . length ;
398398 if ( len !== bDecoders . length )
@@ -409,6 +409,29 @@ function _Json_listEquality(aDecoders, bDecoders)
409409 return true ;
410410}
411411
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+ }
412435
413436// ENCODE
414437
You can’t perform that action at this time.
0 commit comments