Skip to content

Commit e09cf34

Browse files
fix(core): fix default resolve() behavior when relPath starts with '/'
1 parent cf885d8 commit e09cf34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const defaultPathHandlers : PathHandlers = {
5151
// note :
5252
// normalize('./test') -> 'test'
5353
// normalize('/test') -> '/test'
54-
return relPath[0] !== '.' ? relPath : Path.normalize(Path.join(Path.dirname(refPath), relPath));
54+
return (relPath[0] !== '.' && relPath[0] !== '/') ? relPath : Path.normalize(Path.join(Path.dirname(refPath), relPath));
5555
}
5656
}
5757

0 commit comments

Comments
 (0)