Fix failbooru in /users/custom_style.css when custom_style is nil.

http://danbooru.donmai.us/users/custom_style.css failed when manually
requested by anonymous users, or by users who didn't have a style set.
This commit is contained in:
evazion
2017-12-23 11:11:50 -06:00
parent 461ddbf017
commit 806513836b
2 changed files with 2 additions and 2 deletions

View File

@@ -218,7 +218,7 @@ class AnonymousUser
end
def custom_style
nil
""
end
def show_deleted_children?

View File

@@ -1,4 +1,4 @@
<% CurrentUser.user.custom_style.split(/\r\n|\r|\n/).each do |line| %>
<% CurrentUser.user.custom_style.to_s.split(/\r\n|\r|\n/).each do |line| %>
<% if line =~ /^@import/ %>
<%= raw(line) %>
<% else %>