Skip to content

Commit

Permalink
Clean out NSNulls in removedSubnodes list (fixes TextureGroup#2059)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnEstropia committed Apr 30, 2022
1 parent 50426db commit 276141e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Source/Private/ASLayoutTransition.mm
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ - (void)calculateSubnodeOperationsIfNeeded
moves:&moves];

_insertedSubnodePositions = findNodesInLayoutAtIndexes(pendingLayout, insertions, &_insertedSubnodes);
_removedSubnodes = [previousNodes objectsAtIndexes:deletions];

NSMutableArray *mutableRemovedNodes = [[previousNodes objectsAtIndexes:deletions] mutableCopy];
[mutableRemovedNodes removeObjectIdenticalTo:[NSNull null]];
_removedSubnodes = [mutableRemovedNodes copy];

// These should arrive sorted in ascending order of move destinations.
for (NSIndexPath *move in moves) {
_subnodeMoves.emplace_back(previousLayout.sublayouts[([move indexAtPosition:0])].layoutElement,
Expand Down

0 comments on commit 276141e

Please sign in to comment.