From 0da8f35659578e58200e189e8f7e0d461834526a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Sun, 24 Mar 2013 22:25:24 +0100 Subject: [PATCH] [fixes #391] exception when wrong resource type in URL --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0d0f97cc979..3f14fdc7fbe 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -93,7 +93,7 @@ class ApplicationController < ActionController::Base # If we are rendering HTML, preload the session data def preload_json - if request.format.html? + if request.format && request.format.html? if guardian.current_user guardian.current_user.sync_notification_channel_position end