If you add a comment just after return keyword (e.g. JSDoc3 module comment)
define('fail', [], function() {
var x = 1;
return /* fail here */ {
a: x
};
});
then an erroneous line break appears in processed code:
;(function() {
var fail;
fail = function () {
var x = 1;
return /* fail here */
{ a: x };
}();
}());
It is no longer functions as intended because return statement implicitly returns undefined. Object {a: x} becomes orphaned.
If you add a comment just after
returnkeyword (e.g. JSDoc3 module comment)then an erroneous line break appears in processed code:
It is no longer functions as intended because
returnstatement implicitly returnsundefined. Object{a: x}becomes orphaned.