Closed
Description
This
house = ->
foo 'bar'
.chain
key: val
.someMore()
im at, home
compiles as
var house;
house = function() {
foo('bar').chain({
key: val
}).someMore();
return im(at, home);
};
However, this
foo 'bar'
.chain
key: val
.someMore()
house = ->
foo 'bar'
.chain
key: val
.someMore()
iWant toGo, backHome
compiles as
var house;
foo('bar').chain({
key: val
}).someMore();
house = function() {
return foo('bar').chain({
key: val
}).someMore();
};
iWant(toGo, backHome);
Why? Removing either .someMore()
call puts the final line back inside the function.