* Adjust code.

This commit is contained in:
caoyanyi
2023-03-17 10:18:54 +08:00
parent 4669b0218c
commit 872a14aa0c
+7 -3
View File
@@ -48,7 +48,11 @@ function initModuleTree()
$(this).parent().parent().parent().addClass('active');
})
$firstModule = $('#moduleTree li a:not([data-has-children="true"])').eq(0);
$firstModule.closest('li.has-list').addClass('open in');
$firstModule.trigger('click');
$firstModule = $('#moduleTree li a:not([data-has-children="true"])');
if($firstModule.length)
{
$firstModule = $firstModule.eq(0);
$firstModule.closest('li.has-list').addClass('open in');
$firstModule.trigger('click');
}
}