rstacruz/js2coffee — Issue #105: converting if(x) object = ... fails
Author: lordnox
Created: 2011-10-27 11:03:36+00:00
State: open

I'm sorry for the title... I have no idea how to describe this.

This code:

if ('string' == typeof options) {
options = { src: options };
}

converts falsely to:

options = src: options if "string" is typeof options

because this is:

var options;
options = {
src: "string" === typeof options ? options : void 0
};

Thanks for your tool!