Skip to content

Commit 9b12935

Browse files
Bug fix
1 parent a13e5ec commit 9b12935

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/pages/debug/script.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ window.addEventListener("message", ({ data: { type, debugLogs } }) => {
1515
});
1616

1717
document.getElementById("debugCodeExecutionButton").addEventListener("click", () => {
18-
if (!confirm("Are you sure you want to execute this code possibly corrupting your computer?")) return;
18+
if (!document.getElementById("debugCodeExecutionInput").value || !confirm("Are you sure you want to execute this code possibly corrupting your computer?")) return;
1919
ipcRenderer.send("executeDebugCode", document.getElementById("debugCodeExecutionInput").value);
2020
document.getElementById("debugCodeExecutionInput").value = "";
2121
});
2222

2323
document.getElementById("debugCodeExecutionInput").addEventListener("keydown", ({ key }) => {
24-
if ((key !== "Enter") || !confirm("Are you sure you want to execute this code possibly corrupting your computer?")) return;
24+
if ((key !== "Enter") || !document.getElementById("debugCodeExecutionInput").value || !confirm("Are you sure you want to execute this code possibly corrupting your computer?")) return;
2525
ipcRenderer.send("executeDebugCode", document.getElementById("debugCodeExecutionInput").value);
2626
document.getElementById("debugCodeExecutionInput").value = "";
2727
});

0 commit comments

Comments
 (0)