Closed PaoloDiBello closed 10 months ago
Sorry @rgerum, I think my last fix didn't properly address the problem, but I think this will do it.
Initially, document.body.dataset.theme is undefined, so this condition typeof document !== "undefined"
was not enough.
This might fix it:
-typeof document !== "undefined" ? document.body.dataset.theme : "light"
+document?.body?.dataset?.theme || "light",
Resolved the issue where the light mode button was incorrectly displayed upon hovering over the avatar in light mode. Adjusted the code to now show the dark mode button as expected when hovering over the avatar. This commit addresses the problem reported in issue #245.