rstacruz/js2coffee — Issue #124: Parse bug
Author: ich
Created: 2012-02-10 08:37:53+00:00
State: open

It

if (url && url != "about:blank") {
content = getContent(url)
content = (function(e) {
if (! (e instanceof Object) || e instanceof Array) {
alert("ERROOOOOOOR!");
}
})(content);
}

parses into

if url and url isnt "about:blank"
content = getContent(url)
content = ((e) ->
alert "ERROOOOOOOR!" if (e instanceof Object) or e instanceof Array
)(content)

but I expect this

if url and url isnt "about:blank"
content = getContent(url)
content = ((e) ->
alert "ERROOOOOOOR!" if (e not instanceof Object) or e instanceof Array
)(content)

but this

//if (url && url != "about:blank") {
content = getContent(url)
content = (function(e) {
if (! (e instanceof Object) || e instanceof Array) {
alert("ERROOOOOOOR!");
}
})(content);
//}

and this

if (url && url != "about:blank") {
// content = getContent(url)
// content = (function(e) {
if (! (e instanceof Object) || e instanceof Array) {
alert("ERROOOOOOOR!");
}
// })(content);
}

parse right.

Help plz :)