mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-22 21:38:11 -05:00
Check if thing.childlisting is falsy before including it
This fixes bold `False`s showing up in the `.json-html` and `.json-compact` renderstyles. Apparently been an issue for 5 years, but it was only noticed now.
This commit is contained in:
@@ -107,5 +107,8 @@
|
||||
%else:
|
||||
<div class="child">
|
||||
%endif
|
||||
${thing.childlisting}</div>
|
||||
%if thing.childlisting:
|
||||
${thing.childlisting}
|
||||
%endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -129,7 +129,9 @@ ${parent.midcol(cls = cls)}
|
||||
%else:
|
||||
<div class="child">
|
||||
%endif
|
||||
%if thing.childlisting:
|
||||
${thing.childlisting}
|
||||
%endif
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
|
||||
@@ -95,7 +95,9 @@
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
<div class="child">
|
||||
${thing.childlisting}
|
||||
%if thing.childlisting:
|
||||
${thing.childlisting}
|
||||
%endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -190,7 +190,9 @@ ${self.RenderPrintable()}
|
||||
|
||||
<%def name="Child(display=True)">
|
||||
<div class="child" ${(not display and "style='display:none'" or "")}>
|
||||
${thing.childlisting}
|
||||
%if thing.childlisting:
|
||||
${thing.childlisting}
|
||||
%endif
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user