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

Error when toggle theme: Maximum call stack size exceeded #8594

Closed
5 of 7 tasks
baur opened this issue Jan 28, 2023 · 1 comment · Fixed by #8619
Closed
5 of 7 tasks

Error when toggle theme: Maximum call stack size exceeded #8594

baur opened this issue Jan 28, 2023 · 1 comment · Fixed by #8619
Assignees
Labels
bug An error in the Docusaurus core causing instability or issues with its execution domain: theme Related to the default theme components
Milestone

Comments

@baur
Copy link

baur commented Jan 28, 2023

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

I got an error when theme toggling

Reproducible demo

No response

Steps to reproduce

  1. npx create-docusaurus@latest my-website classic
  2. Just toggle the theme dark <> light

Expected behavior

no error on the console

Actual behavior

Uncaught RangeError: Maximum call stack size exceeded.
    at dispatchChangeEvent (storageUtils.ts?10b8:23:1)
    at Object.set (storageUtils.ts?10b8:131:1)
    at storeColorMode (colorMode.tsx?7cd1:47:1)
    at eval (colorMode.tsx?7cd1:72:1)
    at onChange (colorMode.tsx?7cd1:72:1)
    at dispatchChangeEvent (storageUtils.ts?10b8:23:1)
    at Object.set (storageUtils.ts?10b8:131:1)
    at storeColorMode (colorMode.tsx?7cd1:47:1)
    at eval (colorMode.tsx?7cd1:72:1)
    at onChange (colorMode.tsx?7cd1:72:1)

image

Your environment

  • Docusaurus version used: 2.3.0
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Node 18
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): Windwos11

Self-service

  • I'd be willing to fix this bug myself.
@baur baur added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Jan 28, 2023
@Josh-Cena Josh-Cena added domain: theme Related to the default theme components and removed status: needs triage This issue has not been triaged by maintainers labels Jan 28, 2023
@Josh-Cena
Copy link
Collaborator

Looks like it's due to #8486

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution domain: theme Related to the default theme components
Projects
None yet
3 participants