Skip to content

Commit

Permalink
Fix trailing build issues (#7450)
Browse files Browse the repository at this point in the history
Use relative path for addons UMD shim module

Use explicit top level wrapper marker for top level elements
  • Loading branch information
sebmarkbage authored Aug 9, 2016
1 parent 8ef00db commit 34c4474
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 4 additions & 2 deletions grunt/config/browserify.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ var SECRET_INTERNALS_NAME = 'React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_
var shimSharedModules = globalShim.configure({
'./ReactCurrentOwner': SECRET_INTERNALS_NAME + '.ReactCurrentOwner',
'./ReactComponentTreeHook': SECRET_INTERNALS_NAME + '.ReactComponentTreeHook',
// All these methods are shared are exposed.
// The methods we used here are exposed on the main React export.
// TODO: Change all renderer code to require the isomorphic React directly
// instead of these internals.
'./ReactElement': 'React',
'./ReactPropTypes': 'React.PropTypes',
'./ReactChildren': 'React.Children',
});

var shimDOMModules = aliasify.configure({
'aliases': {
'./ReactAddonsDOMDependencies': './build/modules/ReactAddonsDOMDependenciesUMDShim.js',
'./ReactAddonsDOMDependencies': {relative: './ReactAddonsDOMDependenciesUMDShim'},
},
});

Expand Down
1 change: 1 addition & 0 deletions src/renderers/dom/client/ReactMount.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ if (__DEV__) {
TopLevelWrapper.prototype.render = function() {
return this.props.child;
};
TopLevelWrapper.isReactTopLevelWrapper = true;

/**
* Mounting is the process of initializing a React component by creating its
Expand Down
5 changes: 1 addition & 4 deletions src/renderers/shared/stack/reconciler/ReactUpdates.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,7 @@ function runBatchedUpdates(transaction) {
if (ReactFeatureFlags.logTopLevelRenders) {
var namedComponent = component;
// Duck type TopLevelWrapper. This is probably always true.
if (
component._currentElement.props.child ===
component._renderedComponent._currentElement
) {
if (component._currentElement.type.isReactTopLevelWrapper) {
namedComponent = component._renderedComponent;
}
markerName = 'React update: ' + namedComponent.getName();
Expand Down

0 comments on commit 34c4474

Please sign in to comment.