FIX: compare Time with nil error in dev env. Remove nils when looking for max mtime.

This commit is contained in:
Neil Lalonde 2014-05-22 18:46:22 -04:00
parent 67db561429
commit d412cd370e
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ class DiscourseStylesheets
0
else
[ Dir.glob("#{Rails.root}/app/assets/stylesheets/**/*.*css").map {|x| File.mtime(x) }.max,
Dir.glob("#{Rails.root}/plugins/**/assets/stylesheets/**/*.*css").map {|x| File.mtime(x) }.max ].max.to_i
Dir.glob("#{Rails.root}/plugins/**/assets/stylesheets/**/*.*css").map {|x| File.mtime(x) }.max ].compact.max.to_i
end
theme = (cs = ColorScheme.enabled) ? "#{cs.id}-#{cs.version}" : 0