From cdce117941a9585a38a91d2b82caa2136a643927 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 17 Jan 2014 13:07:17 +1100 Subject: [PATCH] BUGFIX: support nil params --- lib/mobile_detection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mobile_detection.rb b/lib/mobile_detection.rb index c06a9c24c8a..3037ff3e48e 100644 --- a/lib/mobile_detection.rb +++ b/lib/mobile_detection.rb @@ -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'