Fixed undefined bug, and removed duplicate spacing

If the teamlead or twitter handle was not specified, then `undefined`
was being printed.

Also, an additional space was being placed if no twitter handle was
present, that is also fixed.
This commit is contained in:
Lee Olayvar
2014-11-21 23:02:50 +00:00
parent 126b60bd70
commit 5b04a63499
+2 -2
View File
@@ -58,8 +58,8 @@ format_json = (data, filepath) ->
output += " <a target='_blank' output += " <a target='_blank'
href='https://twitter.com/home?status=Go team href='https://twitter.com/home?status=Go team
%23#{data.teamName.replace /\W+/g, ""} %23#{data.teamName.replace /\W+/g, ""}
for @koding %23hackathon for @koding %23hackathon\
#{if teamLead?.twitter? then "led by @"+teamLead.twitter} #{if teamLead?.twitter? then " led by @"+teamLead.twitter else ''}
https://koding.com/Hackathon'> https://koding.com/Hackathon'>
<img src='https://g.twimg.com/Twitter_logo_blue.png' height='14'/> <img src='https://g.twimg.com/Twitter_logo_blue.png' height='14'/>
##{data.teamName} ##{data.teamName}