diff --git a/lib/path.js b/lib/path.js index 04187aaf2f4..44ef0d68e25 100644 --- a/lib/path.js +++ b/lib/path.js @@ -206,7 +206,7 @@ if (isWindows) { exports.isAbsolute = function(path) { var result = splitDeviceRe.exec(path), device = result[1] || '', - isUnc = device && device.charAt(1) !== ':'; + isUnc = !!device && device.charAt(1) !== ':'; // UNC paths are always absolute return !!result[2] || isUnc; };