mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
BUGFIX: support nil params
This commit is contained in:
parent
a30aaa90d5
commit
cdce117941
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ module MobileDetection
|
|||
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'
|
||||
|
|
Loading…
Reference in a new issue