Skip to content

Commit

Permalink
Return inactive_class instead of '' if request is None
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederich Nikolaj Godsk Pedersen committed Jun 7, 2024
1 parent 339aa12 commit b8c07da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion active_link/templatetags/active_link_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def active_link(
request = context.get("request")
if request is None:
# Can't work without the request object.
return ""
return inactive_class

if request.resolver_match is not None:
# Capture the url kwargs to reverse against
Expand Down

0 comments on commit b8c07da

Please sign in to comment.