From 7a1d87bd33df9393cfd8227a1c12730352ed8328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Fri, 18 Dec 2015 11:27:49 -0800 Subject: [PATCH] A couple small style fixups that were missed in recent PRs --- .../shared/reconciler/ReactCompositeComponent.js | 9 ++++----- .../reconciler/__tests__/ReactCompositeComponent-test.js | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/renderers/shared/reconciler/ReactCompositeComponent.js b/src/renderers/shared/reconciler/ReactCompositeComponent.js index a8ccef5f50..e41f69ce87 100644 --- a/src/renderers/shared/reconciler/ReactCompositeComponent.js +++ b/src/renderers/shared/reconciler/ReactCompositeComponent.js @@ -197,13 +197,12 @@ var ReactCompositeComponentMixin = { var propsMutated = inst.props !== publicProps; var componentName = - Component.displayName || Component.name || 'Component'; + Component.displayName || Component.name || 'Component'; warning( - typeof inst.props === 'undefined' || - !propsMutated, + typeof inst.props === 'undefined' || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + - 'up the same props that your component\'s constructor was passed.', + 'up the same props that your component\'s constructor was passed.', componentName, componentName ); } @@ -328,7 +327,7 @@ var ReactCompositeComponentMixin = { this._instance.state = this._processPendingState(this._instance.props, this._instance.context); } checkpoint = transaction.checkpoint(); - + this._renderedComponent.unmountComponent(); transaction.rollback(checkpoint); diff --git a/src/renderers/shared/reconciler/__tests__/ReactCompositeComponent-test.js b/src/renderers/shared/reconciler/__tests__/ReactCompositeComponent-test.js index 6d8bc37544..13af9e1329 100644 --- a/src/renderers/shared/reconciler/__tests__/ReactCompositeComponent-test.js +++ b/src/renderers/shared/reconciler/__tests__/ReactCompositeComponent-test.js @@ -1193,7 +1193,7 @@ describe('ReactCompositeComponent', function() { expect(console.error.calls.length).toBe(1); expect(console.error.argsForCall[0][0]).toContain( 'Foo(...): When calling super() in `Foo`, make sure to pass ' + - 'up the same props that your component\'s constructor was passed.' + 'up the same props that your component\'s constructor was passed.' ); });