diff --git a/packages/critters/src/util.js b/packages/critters/src/util.js index 45da694..7312c36 100644 --- a/packages/critters/src/util.js +++ b/packages/critters/src/util.js @@ -41,6 +41,5 @@ export function createLogger(logLevel) { } export function isSubpath(basePath, currentPath) { - const relative = path.relative(basePath, currentPath); - return relative && !relative.startsWith('..') && !path.isAbsolute(relative); + return !path.relative(basePath, currentPath).startsWith('..'); }