Skip to content

Commit 6448f5d

Browse files
Copilotjbampton
andauthored
fix: correct inverted localStorage value and add null-guard in d-key toggle
Agent-Logs-Url: https://github.com/NextCommunity/NextCommunity.github.io/sessions/bc6011cc-b6dd-4d83-8400-f901f06940fd Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com>
1 parent f3fbb9c commit 6448f5d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/assets/js/script.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,10 +653,11 @@ window.addEventListener("keydown", (e) => {
653653
if (key === "d") {
654654
e.preventDefault();
655655

656-
const systemDash = document.getElementById("dev-tools"); // Adjust ID as needed
656+
const systemDash = document.getElementById("dev-tools");
657+
if (!systemDash) return;
657658
const isOpening = systemDash.classList.contains("hidden");
658659

659-
localStorage.setItem("devToolsVisible", !isOpening);
660+
localStorage.setItem("devToolsVisible", isOpening);
660661
playSound(isOpening ? "secret" : "click");
661662

662663
if (isOpening) {

0 commit comments

Comments
 (0)