mirror of
https://github.com/discourse/discourse.git
synced 2025-05-01 20:44:37 +08:00
FIX: Include preloaded data even if the request type isn't explicitly text/html
This commit is contained in:
parent
4392a17b54
commit
02b1f78410
@ -97,7 +97,10 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
# If we are rendering HTML, preload the session data
|
||||
def preload_json
|
||||
if request.format && request.format.html?
|
||||
|
||||
# We don't preload JSON on xhr or JSON request
|
||||
return if request.xhr?
|
||||
|
||||
if guardian.current_user
|
||||
guardian.current_user.sync_notification_channel_position
|
||||
end
|
||||
@ -112,7 +115,6 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
store_preloaded("siteSettings", SiteSetting.client_settings_json)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def inject_preview_style
|
||||
|
Loading…
x
Reference in New Issue
Block a user