Skip to content

Commit 8113a0b

Browse files
committed
Rename initialState => initialActiveState
1 parent e394d14 commit 8113a0b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

modules/mixins/ActiveDelegate.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ var ActiveDelegate = {
4242
},
4343

4444
propTypes: {
45-
initialState: React.PropTypes.object
45+
initialActiveState: React.PropTypes.object // Mainly for testing.
4646
},
4747

4848
getDefaultProps: function () {
4949
return {
50-
initialState: {}
50+
initialActiveState: {}
5151
};
5252
},
5353

5454
getInitialState: function () {
55-
var initialState = this.props.initialState;
55+
var state = this.props.initialActiveState;
5656

5757
return {
58-
activeRoutes: initialState.activeRoutes || [],
59-
activeParams: initialState.activeParams || {},
60-
activeQuery: initialState.activeQuery || {}
58+
activeRoutes: state.activeRoutes || [],
59+
activeParams: state.activeParams || {},
60+
activeQuery: state.activeQuery || {}
6161
};
6262
},
6363

modules/mixins/__tests__/ActiveDelegate-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('ActiveDelegate', function () {
2323
beforeEach(function () {
2424
component = ReactTestUtils.renderIntoDocument(
2525
App({
26-
initialState: {
26+
initialActiveState: {
2727
activeRoutes: [ route ]
2828
}
2929
})
@@ -44,7 +44,7 @@ describe('ActiveDelegate', function () {
4444
beforeEach(function () {
4545
component = ReactTestUtils.renderIntoDocument(
4646
App({
47-
initialState: {
47+
initialActiveState: {
4848
activeRoutes: [ route ],
4949
activeParams: { id: '123', show: 'true', variant: 456 },
5050
activeQuery: { search: 'abc', limit: 789 }
@@ -81,7 +81,7 @@ describe('ActiveDelegate', function () {
8181
beforeEach(function () {
8282
component = ReactTestUtils.renderIntoDocument(
8383
App({
84-
initialState: {
84+
initialActiveState: {
8585
activeRoutes: [ route ],
8686
activeParams: { id: 123 }
8787
}

0 commit comments

Comments
 (0)