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'.