Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/renderers/native/ReactNativeFiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 5 additions & 1 deletion src/renderers/native/ReactNativeStack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down