PERF: Remove an unncessary query when check for dark mode.

This commit is contained in:
Guo Xiang Tan
2020-09-09 15:18:52 +08:00
parent fb7bbae3f4
commit 4994b0ed34

View File

@@ -473,6 +473,7 @@ module ApplicationHelper
end
def dark_color_scheme?
return false if scheme_id.blank?
ColorScheme.find_by_id(scheme_id)&.is_dark?
end