Skip to content

Commit ebc2cb8

Browse files
fix: use path.resolve instead of string interpolation
Co-authored-by: JounQin <admin@1stg.me>
1 parent fba2865 commit ebc2cb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ const isFile = (path?: string | undefined): path is string => {
251251
}
252252

253253
const isModule = (modulePath?: string | undefined): modulePath is string => {
254-
return !!modulePath && isFile(`${modulePath}${path.sep}package.json`)
254+
return !!modulePath && isFile(path.resolve(modulePath, 'package.json')
255255
}
256256

257257
/**

0 commit comments

Comments
 (0)