coffy-script icon indicating copy to clipboard operation
coffy-script copied to clipboard

yielding into a single-element list doesn't work

Open loveencounterflow opened this issue 12 years ago • 0 comments

this coffyscript code

[ text ] = yield read_text_file route, resume

will be translated into

text = yield(read_text_file(route, resume))[0];

which is wrong and won't work. instead, something like

_ref = yield(read_text_file(route, resume))
text = _ref[0];

should work.

loveencounterflow avatar Jun 10 '13 17:06 loveencounterflow