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:
@@ -218,7 +218,7 @@ class AnonymousUser
|
|||||||
end
|
end
|
||||||
|
|
||||||
def custom_style
|
def custom_style
|
||||||
nil
|
""
|
||||||
end
|
end
|
||||||
|
|
||||||
def show_deleted_children?
|
def show_deleted_children?
|
||||||
|
|||||||
@@ -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/ %>
|
<% if line =~ /^@import/ %>
|
||||||
<%= raw(line) %>
|
<%= raw(line) %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|||||||
Reference in New Issue
Block a user