From b40ee7236ccc54fd3678ee2e9e3a876f7dc56db7 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Mon, 27 Mar 2023 18:24:20 +0300 Subject: [PATCH] Fix backgrounds resetting on upload click --- public/script.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/script.js b/public/script.js index 577e4ec37..7d845a195 100644 --- a/public/script.js +++ b/public/script.js @@ -3241,6 +3241,11 @@ $(document).ready(function () { //when user clicks on a BG thumbnail... var this_bgfile = $(this).attr("bgfile"); // this_bgfile = whatever they clicked + // if clicked on upload button + if (!this_bgfile) { + return; + } + if (bg1_toggle == true) { //if bg1 is toggled true (initially set as true in first JS vars) bg1_toggle = false; // then toggle it false