Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2] Page hot reload error #6382

Closed
porfirioribeiro opened this issue Jul 11, 2018 · 2 comments · Fixed by #6388
Closed

[v2] Page hot reload error #6382

porfirioribeiro opened this issue Jul 11, 2018 · 2 comments · Fixed by #6388
Assignees
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@porfirioribeiro
Copy link
Contributor

Description

After this merge #6226
The way as pages are stored in redux changed, so this line

.pages.filter(p => !_.includes(statefulPlugins, p.pluginCreatorId))

Gives error

Steps to reproduce

Edit any file so it needs to hot reload

Expected result

Reload the page content

Actual result

error UNHANDLED REJECTION


  TypeError: store.getState(...).pages.filter is not a function

  - page-hot-reloader.js:65
    [website]/[gatsby]/dist/bootstrap/page-hot-reloader.js:65:28
@porfirioribeiro
Copy link
Contributor Author

porfirioribeiro commented Jul 11, 2018

I think here it might also give errors

const page = pages.find(p => p.path === pagePath)

.pages.filter(p => p.component === path)

@pieh pieh self-assigned this Jul 11, 2018
@pieh pieh added the type: bug An issue or pull request relating to a bug in Gatsby label Jul 11, 2018
@m-allanson
Copy link
Contributor

@pieh's fix was published in [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants