Don't traverse view trees that are not managed by react-native-github

Reviewed By: tadeuzagallo

Differential Revision: D2641753

fb-gh-sync-id: 924df6c4142ad4a467003d0039a0d7f843d9b63c
This commit is contained in:
Pieter De Baets 2015-11-11 08:12:13 -08:00 committed by facebook-github-bot-7
parent 215872c2eb
commit be9cd6c9cf

View File

@ -35,9 +35,12 @@
static void RCTTraverseViewNodes(id<RCTComponent> view, void (^block)(id<RCTComponent>))
{
if (view.reactTag) block(view);
for (id<RCTComponent> subview in view.reactSubviews) {
RCTTraverseViewNodes(subview, block);
if (view.reactTag) {
block(view);
for (id<RCTComponent> subview in view.reactSubviews) {
RCTTraverseViewNodes(subview, block);
}
}
}