fix for nil session in mobile_detection.rb

This commit is contained in:
nitper 2014-01-16 20:04:38 -08:00
parent cdce117941
commit fc9c6c8d18
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ module MobileDetection
session[:mobile_view] = params[:mobile_view] if params && params.has_key?(:mobile_view) 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' session[:mobile_view] == '1'
else else
mobile_device?(user_agent) mobile_device?(user_agent)