PERF: Remove an unncessary query when check for dark mode.
This commit is contained in:
parent
fb7bbae3f4
commit
4994b0ed34
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue