Skip to content

Commit

Permalink
fix: code style problem caused by prettier (umijs#7109)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc authored Aug 3, 2021
1 parent 0a3ce9a commit b785b04
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ function getPathWithPkgJSON(path: string) {
// ref: https://unpkg.alibaba-inc.com/browse/[email protected]/package.json
const indexTarget = join(path, 'index.js');
return (
(pkg.module && getPathWithExt(join(path, pkg.module))) ||
getPathWithIndexFile(join(path, pkg.module)) ||
(pkg.main && getPathWithExt(join(path, pkg.main))) ||
getPathWithIndexFile(join(path, pkg.main)) ||
(pkg.module &&
(getPathWithExt(join(path, pkg.module)) ||
getPathWithIndexFile(join(path, pkg.module)))) ||
(pkg.main &&
(getPathWithExt(join(path, pkg.main)) ||
getPathWithIndexFile(join(path, pkg.main)))) ||
getPathWithExt(indexTarget) ||
getPathWithIndexFile(indexTarget)
);
Expand Down

0 comments on commit b785b04

Please sign in to comment.