null gating for component tree states

Reviewed By: sebmarkbage

Differential Revision: D4592611

fbshipit-source-id: ab1995e60d411c57fc59978d6d6392031334079e
This commit is contained in:
Yi Sun 2017-02-21 15:25:45 -08:00 committed by Facebook Github Bot
parent f6bd8a38ec
commit 724d89d7eb
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ function getInstanceFromTag(tag) {
function getTagFromInstance(inst) { function getTagFromInstance(inst) {
// TODO (bvaughn) Clean up once Stack is deprecated // TODO (bvaughn) Clean up once Stack is deprecated
var tag = inst._rootNodeID || inst.stateNode._nativeTag; var tag = inst._rootNodeID || (inst.stateNode && inst.stateNode._nativeTag);
invariant(tag, 'All native instances should have a tag.'); invariant(tag, 'All native instances should have a tag.');
return tag; return tag;
} }