Fix bug in the compact function.
This commit is contained in:
parent
b91e669050
commit
a7b8689fb8
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user