Permalink
Browse files

Fix error when a link has flair_text but not flair_css_class.

  • Loading branch information...
1 parent bccb2ff commit a058ae02f45a3d64639abf82a3ca68aa767ce60d Logan Hanks committed with spladug Apr 20, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 r2/r2/templates/link.html
@@ -79,9 +79,10 @@
</%def>
<%def name="flair()">
- %if c.user.pref_show_link_flair and (thing.flair_text or thing.flair_css_class):
+ <% css = thing.flair_css_class or '' %>
+ %if c.user.pref_show_link_flair and (thing.flair_text or css):
## TODO: clean this up
- <span class="linkflair ${' '.join('linkflair-' + c for c in thing.flair_css_class.split())}">
+ <span class="linkflair ${' '.join('linkflair-' + c for c in css.split())}">
${thing.flair_text}
</span>
%endif

0 comments on commit a058ae0

Please sign in to comment.