FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

module: refactor condition · nodejs/node@cb4d8ce · GitHub

/ node Public

Commit cb4d8ce

Browse files
authored andcommitted
module: refactor condition
PR-URL: #32989 Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
1 parent 8a4de2e commit cb4d8ce

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎lib/internal/errors.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,7 @@ E('ERR_INVALID_PACKAGE_TARGET',
11211121
return `Invalid "exports" main target ${JSONStringify(target)} defined ` +
11221122
`in the package config ${pkgPath}${sep}package.json${relError ?
11231123
'; targets must start with "./"' : ''}`;
1124-
} else if (typeof target === 'string' && target !== '' &&
1125-
!StringPrototypeStartsWith(target, './')) {
1124+
} else if (relError) {
11261125
return `Invalid "exports" target ${JSONStringify(target)} defined for '${
11271126
StringPrototypeSlice(key, 0, -subpath.length || key.length)}' in the ` +
11281127
`package config ${pkgPath}${sep}package.json; ` +

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL