Skip to content

Commit

Permalink
Simplifying logic
Browse files Browse the repository at this point in the history
  • Loading branch information
karolyi authored and fjsj committed Oct 3, 2021
1 parent b19b39d commit 7be24f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webpack_loader/templatetags/webpack_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def render_bundle(
if skip_common_chunks:
warn(message=_WARNING_MESSAGE, category=RuntimeWarning)
return mark_safe('\n'.join(tags))
used_tags = getattr(context['request'], '_webpack_loader_used_tags', None)
used_tags = getattr(request, '_webpack_loader_used_tags', None)
if not used_tags:
used_tags = context['request']._webpack_loader_used_tags = set()
used_tags = request._webpack_loader_used_tags = set()
if skip_common_chunks:
tags = [tag for tag in tags if tag not in used_tags]
used_tags.update(tags)
Expand Down

0 comments on commit 7be24f3

Please sign in to comment.