Uglify file failed with "undefined is not a function" #15

Closed
SimonDegraeve opened this Issue Feb 8, 2013 · 2 comments

Comments

Projects
None yet
2 participants

Hello,

I got an issue with uglifyjs:

My .coffee file

$ ->  
  alert "ok"

My generated .js file

(function() {
  $(function() {
    return alert("ok");
  });
}).call(this);

Because uglify remove the last semicolon, this is cause an error

undefined is not a function

Solution
In /lib/build.js, line 211 replace with

this.data[combinePath] += this.data[path] + ';\n';

Note: the semicolon added before the newline
Owner

kof commented Feb 8, 2013

yeah, additional semicolon will not break anything, but a missing one.

@kof kof closed this in 7e8f6d4 Feb 8, 2013

Owner

kof commented Feb 8, 2013

published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment