@@ -32,11 +32,8 @@ export default class Router {
32
32
Promise . resolve ( )
33
33
. then ( async ( ) => {
34
34
const data = await this . fetchComponent ( route )
35
- let props
36
- if ( route !== this . route ) {
37
- const ctx = { ...data . ctx , pathname, query }
38
- props = await this . getInitialProps ( data . Component , ctx )
39
- }
35
+ const ctx = { ...data . ctx , pathname, query }
36
+ const props = await this . getInitialProps ( data . Component , ctx )
40
37
41
38
this . route = route
42
39
this . set ( getURL ( ) , { ...data , props } )
@@ -72,10 +69,8 @@ export default class Router {
72
69
let props
73
70
try {
74
71
data = await this . fetchComponent ( route )
75
- if ( route === this . route ) {
76
- const ctx = { ...data . ctx , pathname, query }
77
- props = await this . getInitialProps ( data . Component , ctx )
78
- }
72
+ const ctx = { ...data . ctx , pathname, query }
73
+ props = await this . getInitialProps ( data . Component , ctx )
79
74
} catch ( err ) {
80
75
if ( err . cancelled ) return false
81
76
throw err
@@ -107,10 +102,8 @@ export default class Router {
107
102
let props
108
103
try {
109
104
data = await this . fetchComponent ( route )
110
- if ( route !== this . route ) {
111
- const ctx = { ...data . ctx , pathname, query }
112
- props = await this . getInitialProps ( data . Component ,
5C49
span> ctx )
113
- }
105
+ const ctx = { ...data . ctx , pathname, query }
106
+ props = await this . getInitialProps ( data . Component , ctx )
114
107
} catch ( err ) {
115
108
if ( err . cancelled ) return false
116
109
throw err
0 commit comments