Commits

Jaap Roes  committed bad7d36

Make sure a nodelist is never None.

  • Participants
  • Parent commits ba07e3e

Comments (0)

Files changed (1)

File src/friendlytagloader/templatetags/friendly_loader.py

             token = parser.next_token()
             if token.token_type == TOKEN_BLOCK and token.contents == end_tag:
                 try:
-                    return IfNode([(Literal(has_tag), nodelist_true),
+                    return IfNode([(Literal(has_tag), CommentNode()),
                                    (None, CommentNode())])
                 except TypeError:  # < 1.4
                     return IfNode(Literal(has_tag), nodelist_true,