mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 01:55:46 +08:00
FIX: do not raise exception when svg path is nil (#13844)
Bug was introduced here: f7ab852e12
If path is nil, it should not raise an exception and continue logging the error.
This commit is contained in:

committed by
GitHub

parent
6db93e86d4
commit
88aa0136e3
@ -180,10 +180,10 @@ class ThemeField < ActiveRecord::Base
|
||||
path = Discourse.store.path_for(upload)
|
||||
end
|
||||
|
||||
content = File.read(path)
|
||||
error = nil
|
||||
|
||||
begin
|
||||
content = File.read(path)
|
||||
svg_file = Nokogiri::XML(content) do |config|
|
||||
config.options = Nokogiri::XML::ParseOptions::NOBLANKS
|
||||
end
|
||||
|
Reference in New Issue
Block a user