mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 18:55:27 +08:00
add more safety
This commit is contained in:
parent
d3943b97df
commit
5474635361
|
@ -156,7 +156,7 @@ class RemoteTheme < ActiveRecord::Base
|
|||
def update_theme_color_schemes(theme, schemes)
|
||||
missing_scheme_names = Hash[*theme.color_schemes.pluck(:name, :id).flatten]
|
||||
|
||||
schemes.each do |name, colors|
|
||||
schemes&.each do |name, colors|
|
||||
missing_scheme_names.delete(name)
|
||||
existing = theme.color_schemes.find_by(name: name)
|
||||
if existing
|
||||
|
|
Loading…
Reference in New Issue
Block a user