Skip to content

Commit

Permalink
module: refactor condition
Browse files Browse the repository at this point in the history
PR-URL: #32989
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Andrey Pechkurov <[email protected]>
  • Loading branch information
MylesBorins authored and BridgeAR committed Apr 28, 2020
1 parent c489a7e commit 6362670
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1117,8 +1117,7 @@ E('ERR_INVALID_PACKAGE_TARGET',
return `Invalid "exports" main target ${JSONStringify(target)} defined ` +
`in the package config ${pkgPath}${sep}package.json${relError ?
'; targets must start with "./"' : ''}`;
} else if (typeof target === 'string' && target !== '' &&
!StringPrototypeStartsWith(target, './')) {
} else if (relError) {
return `Invalid "exports" target ${JSONStringify(target)} defined for '${
StringPrototypeSlice(key, 0, -subpath.length || key.length)}' in the ` +
`package config ${pkgPath}${sep}package.json; ` +
Expand Down

0 comments on commit 6362670

Please sign in to comment.