From ebb5d7fd3d82081fbb796f99a688cc3275767194 Mon Sep 17 00:00:00 2001 From: DiegoAndresCortes Date: Mon, 23 Sep 2024 01:38:20 +0000 Subject: [PATCH] chore: Sync Theme-Customs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Diego Andrés --- themecustoms/Color/Variants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themecustoms/Color/Variants.php b/themecustoms/Color/Variants.php index 675cf3d..a43528d 100644 --- a/themecustoms/Color/Variants.php +++ b/themecustoms/Color/Variants.php @@ -275,7 +275,7 @@ public function settings(array &$theme_settings, array &$settings_types) : void // Change the thumbnail on selection addInlineJavaScript(' - document.querySelector(\'#options_variant\').addEventListener(\'change\', function() { + document.querySelector(\'#options_variant\')?.addEventListener(\'change\', function() { let thumbnail = document.querySelector(\'#variant_preview\'); let variant = \'_\' + this.value; thumbnail.src = smf_images_url + \'/thumbnail\' + (this.value === \'default\' ? \'\' : variant) + \'.png\';