Skip to content

Commit 9a021ed

Browse files
committed
refactor(page): fix module / module.default discrepancy
I think the discrepancy for different devs is due to `remark-loader` versions or some other environment issue. Will dig into that further but this fixes the problem for now.
1 parent 7b805b3 commit 9a021ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Page/Page.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ class Page extends React.Component {
7070
componentDidMount() {
7171
if ( this.props.content instanceof Promise ) {
7272
this.props.content
73-
.then(content => this.setState({
74-
content
73+
.then(module => this.setState({
74+
content: module.default || module
7575
}))
7676
.catch(error => this.setState({
7777
content: 'Error loading content.'

0 commit comments

Comments
 (0)