diff --git a/lib/util.js b/lib/util.js index 35bd93d6..b4486ef4 100644 --- a/lib/util.js +++ b/lib/util.js @@ -247,8 +247,9 @@ exports.isAbsolute = function(aPath) { * @param aRoot The root path or URL. * @param aPath The path or URL to be made relative to aRoot. */ -function relative(aRoot, aPath) { - if (aRoot === "") { +function relative(aRoot, aPath) { + + if (typeof aRoot == 'undefined' || aRoot === "") { aRoot = "."; }