mozilla/source-map — pull request #129 by jgoz (2014-07-27 22:49:57+00:00)
Title: Handle empty root in util.relative

Re #128, an empty root passed to util.relative should return `aPath` as-is. This avoids stripping the leading `/` off of absolute file paths.

Since we don't know whether the empty string is a URL or a file path, we cannot make an assumption either way and should return the path unmodified.

See webpack/core#5 for context around this fix. Specifically, https://github.com/webpack/core/pull/5#issuecomment-50284072 and https://github.com/webpack/core/pull/5#issuecomment-50285215.