mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
* Fix #3709: throwing an if, for, switch or while should throw the returned value of the statement/loop * Fix #3789: don’t throw a throw (unless it’s in a closure) * LEVEL_LIST works better than a list of node types
This commit is contained in:
@@ -4774,7 +4774,7 @@
|
||||
|
||||
compileNode(o) {
|
||||
var fragments;
|
||||
fragments = this.expression.compileToFragments(o);
|
||||
fragments = this.expression.compileToFragments(o, LEVEL_LIST);
|
||||
unshiftAfterComments(fragments, this.makeCode('throw '));
|
||||
fragments.unshift(this.makeCode(this.tab));
|
||||
fragments.push(this.makeCode(';'));
|
||||
|
||||
Reference in New Issue
Block a user