Skip to content

Commit

Permalink
avoid JS errors if container does not exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
browniebraun committed Feb 2, 2025
1 parent 6b81f10 commit cb8d743
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions lib/html_tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -2022,14 +2022,15 @@ function html_tree_get_content() {
windowHeight = $(window).height();
navOffset = $('.cactiTreeNavigationArea').offset();

if (navOffset.top == undefined) {
navOffset.top = 0;
}

if (navHeight + navOffset.top < windowHeight) {
$('.cactiTreeNavigationArea').height(windowHeight - navOffset.top);
}

if (navOffset !== undefined) {
if (navOffset.top == undefined) {
navOffset.top = 0;
}

if (navHeight + navOffset.top < windowHeight) {
$('.cactiTreeNavigationArea').height(windowHeight - navOffset.top);
}
}
handleUserMenu();
});
</script>
Expand Down

0 comments on commit cb8d743

Please sign in to comment.