Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMD destroys multiline return statements #108

Open
aleventhal opened this issue Jan 7, 2016 · 3 comments
Open

AMD destroys multiline return statements #108

aleventhal opened this issue Jan 7, 2016 · 3 comments

Comments

@aleventhal
Copy link

The following code is altered so that undefined is returned, rather than 99:

function shouldReturn99(event) {
  return
  99;
}

AMDClean adds a semicolon after the return, as follows:

;(function() {
function shouldReturn99(event) {
  return;
  99;
}
}());
@finom
Copy link

finom commented Feb 8, 2016

@aleventhal nope, it should return undefined.

@ooxi
Copy link
Contributor

ooxi commented Feb 9, 2016

According to my browser, @finom is right

@Neonit
Copy link

Neonit commented Sep 6, 2017

Should be closed.
See also: http://ecma-international.org/ecma-262/5.1/#sec-7.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants