Skip to content

Commit

Permalink
fix(gatsby): Ensure that EnsureResources ensures resources
Browse files Browse the repository at this point in the history
  • Loading branch information
blainekasten committed Jan 30, 2020
1 parent 45bb5e9 commit e074047
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/gatsby/cache-dir/ensure-resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ class EnsureResources extends React.Component {
})
}

componentDidMount() {
if (!this.state.pageResources) {
this.loadResources(this.props.location.pathname)
}
}

shouldComponentUpdate(nextProps, nextState) {
// Always return false if we're missing resources.
if (!nextState.pageResources) {
Expand Down

0 comments on commit e074047

Please sign in to comment.