Skip to content

Commit a694560

Browse files
committed
Merge pull request #54 from charpeni/fix-0.7.0-rc
Fix 0.7.0 rc
2 parents 916aae9 + b818a09 commit a694560

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

index.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ class Router extends React.Component {
7373
this.emitter = new EventEmitter();
7474
}
7575

76+
componentWillMount() {
77+
this.state.route = this.props.firstRoute;
78+
}
79+
7680
componentDidMount() {
7781
this.refs.navigator.navigationContext.addListener('willfocus', (event) => {
7882
const route = event.data.route;
@@ -96,23 +100,23 @@ class Router extends React.Component {
96100
this.onWillPush(route);
97101
});
98102
aspect.after(this.refs.navigator, 'push', (route) => {
99-
//temporary hack to fix bug in aspect library
103+
// temporary hack to fix bug in aspect library
100104
this.onDidPush(route || arguments[1]);
101105
});
102106

103107
aspect.before(this.refs.navigator, 'resetTo', (route) => {
104108
this.onWillResetTo(route);
105109
});
106110
aspect.after(this.refs.navigator, 'resetTo', (route) => {
107-
//temporary hack to fix bug in aspect library
111+
// temporary hack to fix bug in aspect library
108112
this.onDidResetTo(route || arguments[1]);
109113
});
110114

111115
aspect.before(this.refs.navigator, 'replace', (route) => {
112116
this.onWillReplace(route);
113117
});
114118
aspect.after(this.refs.navigator, 'replace', (route) => {
115-
//temporary hack to fix bug in aspect library
119+
// temporary hack to fix bug in aspect library
116120
this.onDidReplace(route || arguments[1]);
117121
});
118122

0 commit comments

Comments
 (0)