Skip to content

Commit

Permalink
Merge pull request #82 from jyhong836/master
Browse files Browse the repository at this point in the history
Fix bug: child parent to be nil.
  • Loading branch information
mdiep committed Oct 8, 2015
2 parents ea3f046 + dc31883 commit 626a138
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/MMElement.m
Expand Up @@ -158,7 +158,13 @@ - (void)setInnerRanges:(NSArray *)innerRanges

- (void)setChildren:(NSArray *)children
{
for (MMElement *child in _children) {
child.parent = nil;
}
_children = [children mutableCopy];
for (MMElement *child in _children) {
child.parent = self;
}
}


Expand Down

0 comments on commit 626a138

Please sign in to comment.