diff --git a/src/TemplatePath.js b/src/TemplatePath.js index c28110d..5524b8e 100644 --- a/src/TemplatePath.js +++ b/src/TemplatePath.js @@ -93,7 +93,7 @@ TemplatePath.getAllDirs = function (path) { */ TemplatePath.normalize = function (thePath) { let filePath = path.normalize(thePath).split(path.sep).join("/"); - if(filePath !== path.sep && filePath.endsWith("/")) { + if(filePath !== "/" && filePath.endsWith("/")) { return filePath.slice(0, -1); } return filePath;