mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fix ART after Native -> Host rename
This commit is contained in:
@@ -23,6 +23,7 @@ var paths = {
|
||||
'!src/**/__benchmarks__/**/*.js',
|
||||
'!src/**/__tests__/**/*.js',
|
||||
'!src/**/__mocks__/**/*.js',
|
||||
'!src/renderers/art/**/*.js',
|
||||
'!src/shared/vendor/**/*.js',
|
||||
],
|
||||
lib: 'build/modules',
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
* @providesModule ReactARTFifteen
|
||||
* @providesModule ReactART
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
'use strict';
|
||||
|
||||
jest
|
||||
.unmock('ReactARTFifteen');
|
||||
.unmock('ReactART');
|
||||
|
||||
var React = require('React');
|
||||
var ReactDOM = require('ReactDOM');
|
||||
@@ -27,7 +27,7 @@ var TestComponent;
|
||||
|
||||
var Missing = {};
|
||||
|
||||
var ReactART = require('ReactARTFifteen');
|
||||
var ReactART = require('ReactART');
|
||||
var ARTSVGMode = require('art/modes/svg');
|
||||
var ARTCurrentMode = require('art/modes/current');
|
||||
|
||||
|
||||
@@ -154,11 +154,10 @@ if (__DEV__) {
|
||||
return inst._debugID;
|
||||
};
|
||||
setParentForInstrumentation = function(child) {
|
||||
invariant(child._debugID != null, 'mooooooooooooooooooo');
|
||||
if (child._debugID !== 0) {
|
||||
ReactInstrumentation.debugTool.onSetParent(
|
||||
child._debugID,
|
||||
getDebugID(this._debugID)
|
||||
getDebugID(this)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -106,6 +106,11 @@ function instantiateReactComponent(node) {
|
||||
// representations. I.e. ART. Once those are updated to use the string
|
||||
// representation, we can drop this code path.
|
||||
instance = new element.type(element);
|
||||
|
||||
// We renamed this. Allow the old name for compat. :(
|
||||
if (!instance.getHostNode) {
|
||||
instance.getHostNode = instance.getNativeNode;
|
||||
}
|
||||
} else {
|
||||
instance = new ReactCompositeComponentWrapper(element);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user