ReactNativeFiber findNodeHandle() bugfix

Reviewed By: sahrens

Differential Revision: D4762397

fbshipit-source-id: d047f5c77067dbf8b0331695bb661e04ce00913c
This commit is contained in:
Brian Vaughn 2017-03-23 10:50:21 -07:00 committed by Facebook Github Bot
parent 123311cad2
commit 333dd59533
1 changed files with 4 additions and 1 deletions

View File

@ -382,7 +382,10 @@ const ReactNative = {
// See NativeMethodsMixin#setNativeProps for more info on why this is done.
findNodeHandle(componentOrHandle: any): ?number {
const instance: any = findNodeHandle(componentOrHandle);
return instance ? instance._nativeTag : null;
if (instance == null || typeof instance === 'number') {
return instance;
}
return instance._nativeTag;
},
render(element: Element<any>, containerTag: any, callback: ?Function) {