From 438c4c897688d6c1aca6a1c0320ad4837ba99db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 23 Aug 2023 01:15:56 -0400 Subject: [PATCH] fix: closes #11945, fix skins loading if there are no custom skins --- public/src/admin/appearance/skins.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/public/src/admin/appearance/skins.js b/public/src/admin/appearance/skins.js index 04b2676615..6e1d7d892e 100644 --- a/public/src/admin/appearance/skins.js +++ b/public/src/admin/appearance/skins.js @@ -18,10 +18,11 @@ define('admin/appearance/skins', [ $('.custom-skin-settings [data-type="list"] [data-theme]').each((i, el) => { $(el).attr('data-theme', $(el).attr('data-theme').toLowerCase()); }); - Skins.render(bsData); + highlightSelectedTheme(app.config.bootswatchSkin); } }); settings.load('custom-skins', $('.custom-skin-settings')); + Skins.render(bsData); }); $('#save-custom-skins').on('click', function () { @@ -89,10 +90,7 @@ define('admin/appearance/skins', [ }, function (html) { themeContainer.html(html); - if (app.config.bootswatchSkin) { - const skin = app.config.bootswatchSkin; - highlightSelectedTheme(skin); - } + highlightSelectedTheme(app.config.bootswatchSkin); }); };