Skip to content

Commit 070d3ad

Browse files
committed
Get module in default or root
1 parent f6097f0 commit 070d3ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/asyncComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default (loader, { placeholder } = {}) => {
2727
}
2828

2929
component
30-
.then((module) => this.mounting && this.setState({ component: module.default }))
30+
.then((module) => this.mounting && this.setState({ component: module.default || module }))
3131
.catch(errorLoading);
3232
}
3333

0 commit comments

Comments
 (0)