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

main.js: Fix dark mode when not using Feather #10

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

DestyNova
Copy link
Contributor

toggleDarkMode() currently fails when it tries to reference one of the Feather icons and we're not using Feather.
This happens if we enable dark mode and any of the following conditions evaluate to false:

(isset .Site.Params "social") (isset .Site.Params "feathericonscdn") (eq .Site.Params.featherIconsCDN true)

This PR just adds a check to see if feather is available before updating the dark/light toggle icon.

Copy link
Owner

@chollinger93 chollinger93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@chollinger93 chollinger93 merged commit 902a5f4 into chollinger93:master Jun 19, 2023
@DestyNova DestyNova deleted the patch-1 branch June 19, 2023 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants