diff --git a/src/renderers/native/ReactNativeFiber.js b/src/renderers/native/ReactNativeFiber.js index 783ae91397d..014b4dfa85d 100644 --- a/src/renderers/native/ReactNativeFiber.js +++ b/src/renderers/native/ReactNativeFiber.js @@ -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, containerTag: any, callback: ?Function) { diff --git a/src/renderers/native/ReactNativeStack.js b/src/renderers/native/ReactNativeStack.js index 37d8b89f561..2a5b8f509b7 100644 --- a/src/renderers/native/ReactNativeStack.js +++ b/src/renderers/native/ReactNativeStack.js @@ -37,7 +37,11 @@ var ReactNative = { // The injected findNodeHandle() strategy returns the instance wrapper though. // See NativeMethodsMixin#setNativeProps for more info on why this is done. findNodeHandle(componentOrHandle: any): ?number { - return findNodeHandle(componentOrHandle).getHostNode(); + const nodeHandle = findNodeHandle(componentOrHandle); + if (nodeHandle == null || typeof nodeHandle === 'number') { + return nodeHandle; + } + return nodeHandle.getHostNode(); }, render: render,