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

Fix Night Mode detection #1032

Merged
merged 1 commit into from Jul 4, 2019
Merged

Conversation

archdragon
Copy link
Contributor

@archdragon archdragon commented Jul 4, 2019

There is a bug with Night Mode switching.

To reproduce:

  1. Go to https://hexdocs.pm/elixir/Kernel.html
  2. Switch Night Mode ON
  3. Switch Night Mode OFF
  4. Refresh the page

CURRENT: Night Mode stays ON.
EXPECTED: Night Mode stays switched ON.

Local storage value is a truthy string (ie. "false", "true"), not a boolean. if(localStorage.getItem('night-mode')) is always true if the key is present.

@josevalim josevalim merged commit afc3407 into elixir-lang:master Jul 4, 2019
@josevalim
Copy link
Member

❤️ 💚 💙 💛 💜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants