From f7d06135efd89972ac9478f4c6250499391855da Mon Sep 17 00:00:00 2001 From: pixeldesu Date: Wed, 29 Mar 2017 15:49:27 -0700 Subject: [PATCH] don't include unnecessary theme files on user profiles --- app/views/layouts/application.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 21d50a58..12f5e08b 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -12,7 +12,7 @@ %title= yield(:title) = javascript_include_tag 'i18n', 'data-turbolinks-track' => true = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true - - if user_signed_in? and not current_user.theme.nil? + - if user_signed_in? and not current_user.theme.nil? and (@user.nil? || @user.theme.nil?) %link{rel: 'stylesheet', href: current_user.theme.css.url, media: :all, 'data-turbolinks-track' => "false"} %meta{name: 'theme-color', content: current_user.theme.theme_color} - if (not @user.nil?) and (not @user.theme.nil?) and (if user_signed_in? then current_user.show_foreign_themes? else true end)