File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export default class Router {
2626
2727 onPopState ( e ) {
2828 this . abortComponentLoad ( )
29- const cur = this . currentComponent
29+ const cur = this . currentComponentData . id
3030 const url = getURL ( )
3131 const { fromComponent, route } = e . state || { }
3232 if ( fromComponent && cur && fromComponent === cur ) {
@@ -44,7 +44,6 @@ export default class Router {
4444 location . reload ( )
4545 } else {
4646 this . currentRoute = route || toRoute ( location . pathname )
47- this . currentComponent = data . Component . displayName
4847 this . currentComponentData = data
4948 this . set ( url )
5049 }
@@ -161,7 +160,7 @@ export default class Router {
161160 if ( err ) {
162161 if ( ! cancelled ) fn ( err )
163162 } else {
164- const d = { data, id : createUid ( ) }
163+ const d = { ... data , id : createUid ( ) }
165164 // we update the cache even if cancelled
166165 if ( ! this . components [ route ] ) {
167166 this . components [ route ] = d
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ export default class App extends Component {
2626
2727 this . close = router . subscribe ( ( ) => {
2828 const state = propsToState ( {
29- router,
30- data : router . currentComponentData
29+ ... router . currentComponentData ,
30+ router
3131 } )
3232
3333 try {
You can’t perform that action at this time.
0 commit comments