File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ function asyncComponent(config) {
135135
}
136136
}
137137

138-
resolveModule() {
138+
resolveModule(props = this.props) {
139139
this.resolving = true
140140

141-
let moduleId = getModuleId(this.props);
142-
return getResolver(this.props)
141+
let moduleId = getModuleId(props);
142+
return getResolver(props)
143143
.then((module) => {
144144
if (this.unmounted) {
145145
return undefined
@@ -178,7 +178,7 @@ function asyncComponent(config) {
178178
if (getModuleId(this.props) !== getModuleId(nextProps)) {
179179
// FIXME add LoadingComponent logic to show old module for X ms (to prevent flash of content) and then show a loading component till the new module is loaded
180180
// FIXME handle case when module id changes while resolving a module
181-
this.resolveModule();
181+
this.resolveModule(nextProps);
182182
}
183183
}
184184

@@ -207,7 +207,7 @@ function asyncComponent(config) {
207207
// to the component, this will be our signal to know that we need to
208208
// re-resolve it.
209209
if (
210-
sharedState.module[getModuleId(this.props)] == null &&
210+
sharedState.modules[getModuleId(this.props)] == null &&
211211
!this.resolving &&
212212
typeof window !== 'undefined'
213213
) {

0 commit comments

Comments
 (0)