Permalink
Browse files

fix problems from yesterday

  • Loading branch information...
1 parent 09d0b9e commit 48df9e96bd1cdad2e7275a8b3ae4aa31f1694cef @maxtaco committed with Nov 19, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/nodes.coffee
View
@@ -1688,7 +1688,11 @@ exports.Await = class Await extends Base
call = new Call cls, [ new Value new Literal "_k" ]
rhs = new Op "new", call
assign = new Assign lhs, rhs
- @body = [ assign ] + body
+ body.unshift assign
+ meth = lhs.add new Access new Value new Literal "_fulfill"
+ call = new Call meth, []
+ body.push (call)
+ @body = body
children: ['body']
@@ -1698,9 +1702,7 @@ exports.Await = class Await extends Base
compileNode: (o) ->
o.indent += TAB
- body += "#{ @body.compile o }\n#{@tab}"
- body += "__tame_deferrals._fulfill();"
- body
+ @body.compile o
# We still need to walk our children to see if there are any embedded
# function which might also be tamed. But we're always going to report

0 comments on commit 48df9e9

Please sign in to comment.