Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/opal/nodes/arglist.rb
Original file line number Diff line number Diff line change
@@ -16,9 +16,9 @@ def compile
if splat
if work.empty?
if code.empty?
code << fragment("Opal.to_a(") << arg << fragment(")")
code << arg
else
code << fragment(".concat(Opal.to_a(") << arg << fragment("))")
code << fragment(".concat(") << arg << fragment(")")
end
else
if code.empty?
@@ -27,7 +27,7 @@ def compile
code << fragment(".concat([") << work << fragment("])")
end

code << fragment(".concat(Opal.to_a(") << arg << fragment("))")
code << fragment(".concat(") << arg << fragment(")")
end

work = []
@@ -43,7 +43,7 @@ def compile
if code.empty?
code = join
else
code << fragment(".concat(Opal.to_a(") << join << fragment("))")
code << fragment(".concat(") << join << fragment(")")
end
end

0 comments on commit e9237be

Please sign in to comment.