Skip to content

Cookie storage creates duplicate cookies with path information on nested routes causing conflict #303

@Coops0

Description

@Coops0

Version

@nuxtjs/color-mode: 3.5.2
nuxt: 4.0.0-28849585.4751b054 (but this is the same on the latest stable Nuxt v3 version, the repo is on v3 too)

Reproduction Link

github repo

Steps to reproduce

  1. Setup the repo above
  2. Switching the theme on the main page works fine. The cookie persists, and loads properly. (delete the cookie to reset)
  3. Navigate to the nested route, and change the theme. Note in your browser's cookies that it has created 2 cookies with the same name and different paths.
  4. Refresh. This will cause conflicts.

What is Expected?

Cookie persistence to not retain any path information.

What is actually happening?

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions