From facec289c4a4392226c2701d8fa0621106f60103 Mon Sep 17 00:00:00 2001 From: HMH Date: Wed, 16 Oct 2024 14:12:54 +0200 Subject: [PATCH] Fix accessing undefined input area rects. --- ts/lib.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/lib.ts b/ts/lib.ts index e477441..ecb873e 100644 --- a/ts/lib.ts +++ b/ts/lib.ts @@ -224,7 +224,6 @@ class Settings { document.getElementById("refresh").onclick = () => this.webSocket.send('"GetCapturableList"'); document.getElementById("custom_input_areas").onclick = () => { this.webSocket.send('"ChooseCustomInputAreas"'); - this.checks.get("enable_custom_input_areas").checked = true; }; this.capturable_select.onchange = () => this.send_server_config(); } @@ -883,6 +882,7 @@ function handle_messages( onConfigError(msg["ConfigError"]); } else if ("CustomInputAreas" in msg) { settings.custom_input_areas = msg["CustomInputAreas"]; + settings.checks.get("enable_custom_input_areas").checked = true; settings.save_settings(); } }