Skip to content

Commit

Permalink
Fix exception if username is nil and there are no posts.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Jul 30, 2017
1 parent 717eb4e commit c6cccd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.rb
Expand Up @@ -438,7 +438,7 @@
@data.select! { |post| post["live_status"] != "LIVE" }
end

@user = @data[0]["from"]["name"] rescue (CGI.unescape(username) || id)
@user = @data[0]["from"]["name"] rescue CGI.unescape(username || id)
@title = @user
if @type == "live"
@title += "'s live videos"
Expand Down

0 comments on commit c6cccd9

Please sign in to comment.