Skip to content

Commit

Permalink
Remove isError() and options.cjs.paths guard from tryParse().
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Sep 17, 2018
1 parent 608a625 commit e980f7d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/module/esm/import.js
Expand Up @@ -6,7 +6,6 @@ import Module from "../../module.js"
import errors from "../../errors.js"
import esmParse from "./parse.js"
import esmResolveFilename from "./resolve-filename.js"
import isError from "../../util/is-error.js"
import isPath from "../../util/is-path.js"
import { resolve } from "../../safe/path.js"
import shared from "../../shared.js"
Expand Down Expand Up @@ -119,9 +118,7 @@ function tryParse(request, entry) {

if (threw &&
(entry.extname === ".mjs" ||
! entry.package.options.cjs.paths ||
! isError(error) ||
error.code !== "MODULE_NOT_FOUND")) {
error.code !== "MODULE_NOT_FOUND")) {
throw error
}

Expand Down

0 comments on commit e980f7d

Please sign in to comment.