mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: detect theme errors and catch them (#7589)
* FEATURE: detect theme errors and catch them * Bump COMPILER_VERSION * Feedback * Override eslint no console for one line * Can't use our ajax method * remove emoji from translation file
This commit is contained in:
@@ -53,11 +53,19 @@ class Theme < ActiveRecord::Base
|
||||
|
||||
Theme.expire_site_cache! if saved_change_to_user_selectable? || saved_change_to_name?
|
||||
notify_with_scheme = saved_change_to_color_scheme_id?
|
||||
name_changed = saved_change_to_name?
|
||||
|
||||
reload
|
||||
settings_field&.ensure_baked! # Other fields require setting to be **baked**
|
||||
theme_fields.each(&:ensure_baked!)
|
||||
|
||||
if name_changed
|
||||
theme_fields.select { |f| f.basic_html_field? }.each do |f|
|
||||
f.value_baked = nil
|
||||
f.ensure_baked!
|
||||
end
|
||||
end
|
||||
|
||||
remove_from_cache!
|
||||
clear_cached_settings!
|
||||
ColorScheme.hex_cache.clear
|
||||
|
||||
Reference in New Issue
Block a user