Skip to content

Commit

Permalink
Fix ternary layout per review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Scott committed Feb 2, 2017
1 parent d5356c2 commit 9176528
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/jest-resolve/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,15 @@ class Resolver {
basedir: options.basedir,
extensions: options.extensions,
moduleDirectory: options.moduleDirectory,
packageFilter: options.module ? packageJson => {
if (packageJson.module) {
packageJson.main = packageJson.module;
}

return packageJson;
} : x => x,
packageFilter: options.module
? packageJson => {
if (packageJson.module) {
packageJson.main = packageJson.module;
}

return packageJson;
}
: x => x,
paths: paths ? (nodePaths || []).concat(paths) : nodePaths,
},
);
Expand Down

0 comments on commit 9176528

Please sign in to comment.