allow leading dot in extension names in fs resolve

This commit is contained in:
Jon Rohan
2013-01-22 12:41:33 -08:00
parent cb6798c357
commit 5969e79ebc

View File

@@ -143,7 +143,7 @@ module.exports =
if extension == ""
return path if @exists(path)
else
pathWithExtension = path + "." + extension
pathWithExtension = path + "." + extension.replace(/^\./, "")
return pathWithExtension if @exists(pathWithExtension)
undefined