gruntjs/grunt-contrib-uglify — pull request #140 by jmeas (2014-01-17 04:14:02+00:00)
Title: Fix relative maps

Fixes a minor bug regarding the location of relative source files. It would previously append a path separator even for files in the same directory, which, of course, is then interpreted as being in the root directory.

To give an example, if your source files and source map were in the same directory, the reference would always be `[ "/script-one.js", "/script-two.js" ]`. But if your website is viewed from, say, `http://some-domain.com/myHomepage/` (and the scripts are relative to that path), this reference would break.

The fix is simple. Only append the path separator when a relative directory exists. Otherwise, don't.