()
| 143 | } |
| 144 | |
| 145 | resolveModule() { |
| 146 | return getResolver() |
| 147 | .then(module => { |
| 148 | if (state.asyncComponents != null) { |
| 149 | state.asyncComponents.resolved(state.id) |
| 150 | } |
| 151 | state.module = module |
| 152 | state.error = null |
| 153 | state.resolving = false |
| 154 | return module |
| 155 | }) |
| 156 | .catch(({ message, stack }) => { |
| 157 | const error = { message, stack } |
| 158 | if (state.asyncComponents != null) { |
| 159 | state.asyncComponents.failed(state.id, error) |
| 160 | } |
| 161 | state.error = error |
| 162 | state.resolving = false |
| 163 | if (!ErrorComponent) { |
| 164 | // eslint-disable-next-line no-console |
| 165 | console.error(error) |
| 166 | } |
| 167 | }) |
| 168 | .then(result => { |
| 169 | if (this.unmounted) { |
| 170 | return undefined |
| 171 | } |
| 172 | if ( |
| 173 | !this.context.reactAsyncBootstrapperRunning && |
| 174 | env === 'browser' |
| 175 | ) { |
| 176 | this.forceUpdate() |
| 177 | } |
| 178 | return result |
| 179 | }) |
| 180 | } |
| 181 | |
| 182 | componentWillUnmount() { |
| 183 | this.unmounted = true |
no test coverage detected