Skip to content

Commit

Permalink
BUGFIX: support nil params
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSaffron committed Jan 17, 2014
1 parent a30aaa9 commit cdce117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mobile_detection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def self.mobile_device?(user_agent)
def self.resolve_mobile_view!(user_agent, params, session)
return false unless SiteSetting.enable_mobile_theme

session[:mobile_view] = params[:mobile_view] if params.has_key?(:mobile_view)
session[:mobile_view] = params[:mobile_view] if params && params.has_key?(:mobile_view)

if session[:mobile_view]
session[:mobile_view] == '1'
Expand Down

0 comments on commit cdce117

Please sign in to comment.