Skip to content

Commit

Permalink
Fix for Fix when list_display_links = None there is no encapsulatin…
Browse files Browse the repository at this point in the history
…g `<a>` tag.
  • Loading branch information
fabiocaccamo authored Feb 3, 2025
1 parent c76f2c6 commit 3400a8b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions treenode/static/treenode/js/treenode.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@

// create accordion button and move level tabs before it
var rowAnchor = scope.closest('a');
// When list_display_links = None there is no encapsulating A tag
if (!rowAnchor.length) rowAnchor = scope;
// fix when `list_display_links = None` there is no encapsulating <a> tag
if (!rowAnchor.length) {
rowAnchor = scope;
}

var rowToggleButtonHTML = '';
rowToggleButtonHTML += '<a class="treenode-accordion-button" href="#">';
Expand Down

0 comments on commit 3400a8b

Please sign in to comment.