From c6cccd9e056b2e5a0a556ef8d0f130772cc6122d Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Sat, 29 Jul 2017 18:28:24 -0700 Subject: [PATCH] Fix exception if username is nil and there are no posts. --- app.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.rb b/app.rb index 3986e7c..04ffd53 100644 --- a/app.rb +++ b/app.rb @@ -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"