mirror of
https://github.com/discourse/discourse.git
synced 2025-05-15 12:33:07 +08:00
Merge pull request #1836 from nitper/patch-2
fix for nil session in mobile_detection.rb
This commit is contained in:
commit
cf04026b15
@ -10,7 +10,7 @@ module MobileDetection
|
||||
|
||||
session[:mobile_view] = params[:mobile_view] if params && params.has_key?(:mobile_view)
|
||||
|
||||
if session[:mobile_view]
|
||||
if session && session[:mobile_view]
|
||||
session[:mobile_view] == '1'
|
||||
else
|
||||
mobile_device?(user_agent)
|
||||
|
Loading…
x
Reference in New Issue
Block a user