From c6797a59ce48ae405b915a3ffb34b396e8b3a06e Mon Sep 17 00:00:00 2001 From: somebody Date: Fri, 6 Jan 2023 18:08:39 -0600 Subject: [PATCH] Localize variables Stop the leaking! --- static/koboldai.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/koboldai.js b/static/koboldai.js index af8b8909..5485c22e 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -2890,8 +2890,9 @@ function save_bias(item) { function sync_to_server(item) { //get value - value = null; - name = null; + let value = null; + let name = null; + if ((item.tagName.toLowerCase() === 'checkbox') || (item.tagName.toLowerCase() === 'input') || (item.tagName.toLowerCase() === 'select') || (item.tagName.toLowerCase() == 'textarea')) { if (item.getAttribute("type") == "checkbox") { value = item.checked;