When 'grunt build' is run all the scripts are merged and minified. This produces a 'undefined' error because one of the scripts is missing a ; semicolon to properly end the script.
Basically we need such a option: https://github.com/gruntjs/grunt-contrib-concat#separator Which does not exist in grunt-contrib-uglify.
This error only appears if you have to do 'grunt build'.
uglifytask, I'm not sure what you can do about it other than either add the semicolons manually or use theconcattask in addition to theuglifytask. - Jordan Kasper