Added check for account variable exists in home_controller meta function

This commit is contained in:
mgabdev 2019-08-18 00:11:41 -04:00
parent d084b8d5f9
commit d3501953f4
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ class HomeController < ApplicationController
elsif params[:account_username].present?
@account = Account.find_local(params[:account_username])
if params[:id].present?
if params[:id].present? && !@account.nil?
@status = @account.statuses.find(params[:id])
@stream_entry = @status.stream_entry
@type = @stream_entry.activity_type.downcase