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

Head function from nuxt.config.js is only considered on the first request #535

Closed
manniL opened this issue Apr 1, 2020 · 1 comment
Closed
Labels

Comments

@manniL
Copy link
Member

manniL commented Apr 1, 2020

Hey 👋🏻

First of all, sorry for the long title 🙈

When defining a head function or object in the nuxt.config.js, it is only evaluated and taken into consideration on the first request / first page a user is visiting.

Reproduction: https://codesandbox.io/s/codesandboxnuxt-oqqsj

Steps:

  1. Go to https://oqqsj.sse.codesandbox.io/
  2. Open inspector -> see tabindex="0" on the body
  3. Click the link to go to /about (it has to be the link, no manual input).
  4. tabindex="0" is gone.

--

Originally reported by @codeofsumit

@manniL manniL added the bug label Apr 1, 2020
@pimlie
Copy link
Collaborator

pimlie commented Apr 5, 2020

The issue seems to be that 0 is a falsy value, if I use tabIndex: 1 it keeps being listed. Working on a fix.

@pimlie pimlie closed this as completed in 1ef4108 Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants