Fix bug in the compact function.

This commit is contained in:
Chris Eppstein 2011-03-27 19:16:59 -07:00
parent b91e669050
commit a7b8689fb8

View File

@ -18,8 +18,9 @@ module Compass::SassExtensions::Functions::Lists
def compact(*args) def compact(*args)
sep = :comma sep = :comma
if args.size == 1 && args.first.is_a?(Sass::Script::List) if args.size == 1 && args.first.is_a?(Sass::Script::List)
args = args.first.value list = args.first
sep = args.first.separator args = list.value
sep = list.separator
end end
Sass::Script::List.new(args.reject{|a| !a.to_bool}, sep) Sass::Script::List.new(args.reject{|a| !a.to_bool}, sep)
end end