Skip to content

Commit 3089995

Browse files
committed
1 parent abc0efa commit 3089995

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/renderers/native/findNodeHandle.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var ReactInstanceMap = require('ReactInstanceMap');
1616
var ReactNativeFeatureFlags = require('ReactNativeFeatureFlags');
1717
var ReactNativeFiberRenderer = require('ReactNativeFiberRenderer');
1818
var {ReactCurrentOwner} = require('ReactGlobalSharedState');
19-
19+
var getComponentName = require('getComponentName.js');
2020
var invariant = require('fbjs/lib/invariant');
2121

2222
if (__DEV__) {
@@ -76,7 +76,7 @@ function findNodeHandle(componentOrHandle: any): any {
7676
'never access something that requires stale data from the previous ' +
7777
'render, such as refs. Move this logic to componentDidMount and ' +
7878
'componentDidUpdate instead.',
79-
owner.getName() || 'A component',
79+
getComponentName(owner)
8080
);
8181

8282
owner._warnedAboutRefsInRender = true;
@@ -111,12 +111,12 @@ function findNodeHandle(componentOrHandle: any): any {
111111
'findNodeHandle(...): Argument is not a component ' +
112112
'(type: %s, keys: %s)',
113113
typeof component,
114-
Object.keys(component),
114+
Object.keys(component)
115115
);
116116
invariant(
117117
false,
118118
'findNodeHandle(...): Unable to find node handle for unmounted ' +
119-
'component.',
119+
'component.'
120120
);
121121
}
122122
}

0 commit comments

Comments
 (0)