From bd1b195dbe8ab51d738b52457fc10589b14d5df7 Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Wed, 24 Feb 2016 20:32:19 -0800 Subject: [PATCH] Fix diffing algorithm not using custom comparison block --- AsyncDisplayKit/Private/NSArray+Diffing.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/Private/NSArray+Diffing.m b/AsyncDisplayKit/Private/NSArray+Diffing.m index 00893d1416..d7a9fd3a52 100644 --- a/AsyncDisplayKit/Private/NSArray+Diffing.m +++ b/AsyncDisplayKit/Private/NSArray+Diffing.m @@ -53,7 +53,7 @@ for (NSInteger j = array.count; j >= 0; j--) { if (i == self.count || j == array.count) { lengths[i][j] = 0; - } else if ([self[i] isEqual:array[j]]) { + } else if (comparison(self[i], array[j])) { lengths[i][j] = 1 + lengths[i+1][j+1]; } else { lengths[i][j] = MAX(lengths[i+1][j], lengths[i][j+1]);