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

Functions declared in data are cleared when fetch is present #8338

Closed
becrespi opened this issue Nov 12, 2020 · 0 comments · Fixed by #8348
Closed

Functions declared in data are cleared when fetch is present #8338

becrespi opened this issue Nov 12, 2020 · 0 comments · Fixed by #8348

Comments

@becrespi
Copy link

Versions

  • nuxt: 2.12.2

Reproduction

https://codesandbox.io/s/distracted-sky-tdi6b

Additional Details

Steps to reproduce

Declare a function as variable inside data in a page

What is Expected?

Access to that variable and use it

What is actually happening?

The variable is empty if I use fetch hook of nuxt. The problem occurs only in ssr mode, if go to the page with the navigator all is working as expected.

danielroe added a commit to danielroe/nuxt.js that referenced this issue Nov 15, 2020

Verified

This commit was signed with the committer’s verified signature.
danielroe Daniel Roe
closes nuxt#8338
@pi0 pi0 closed this as completed in #8348 Nov 16, 2020
@pi0 pi0 mentioned this issue Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants