Skip the filter initialization if there are no projects
authorAlexander Ebert <ebert@woltlab.com>
Sat, 16 Sep 2023 16:45:07 +0000 (18:45 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 16 Sep 2023 16:45:07 +0000 (18:45 +0200)
See https://www.woltlab.com/community/thread/301637-js-fehler-in-entwickler-werkzeuge-wenn-kein-projekt-vorhanden-ist/

wcfsetup/install/files/acp/templates/devtoolsProjectList.tpl

index 133d6c362cc6cc36d46bccbf1ff91caec873c29c..ca8688325a7bd8ac84681e14b5affa15ef1e8463 100644 (file)
@@ -4,8 +4,11 @@
        require(['WoltLabSuite/Core/Acp/Ui/Devtools/Project/FilterByName', 'WoltLabSuite/Core/Acp/Ui/Devtools/Project/QuickSetup', 'Language'], function({ setup: setupFilterByName }, AcpUiDevtoolsProjectQuickSetup, Language) {
                Language.add('wcf.acp.devtools.project.quickSetup', '{jslang}wcf.acp.devtools.project.quickSetup{/jslang}');
                
-               setupFilterByName();
                AcpUiDevtoolsProjectQuickSetup.init();
+
+               {if $objects|count}
+                       setupFilterByName();
+               {/if}
        });
 </script>