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)
sep = :comma
if args.size == 1 && args.first.is_a?(Sass::Script::List)
args = args.first.value
sep = args.first.separator
list = args.first
args = list.value
sep = list.separator
end
Sass::Script::List.new(args.reject{|a| !a.to_bool}, sep)
end