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