Skip to content

Commit

Permalink
Fix when list_display_links = None there is no encapsulating <a>
Browse files Browse the repository at this point in the history
…tag.

* fix for when list_display_links = None

* Fix for Fix when `list_display_links = None` there is no encapsulating `<a>` tag.

---------

Co-authored-by: Fabio Caccamo <[email protected]>
  • Loading branch information
bernieke and fabiocaccamo authored Feb 3, 2025
1 parent 2b9ee38 commit 72d9a69
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions treenode/static/treenode/js/treenode.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@

// create accordion button and move level tabs before it
var rowAnchor = scope.closest('a');
// 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 72d9a69

Please sign in to comment.