Skip to content

Commit

Permalink
refactor: return early in isBuiltIn for resolved modules
Browse files Browse the repository at this point in the history
  • Loading branch information
echenley committed Mar 9, 2019
1 parent 90fb1da commit 9eed55b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/importType.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ export function isAbsolute(name) {

// path is defined only when a resolver resolves to a non-standard path
export function isBuiltIn(name, settings, path) {
if (path) return false
const base = baseModule(name)
const extras = (settings && settings['import/core-modules']) || []
return !path && coreModules[base] || extras.indexOf(base) > -1
return coreModules[base] || extras.indexOf(base) > -1
}

function isExternalPath(path, name, settings) {
Expand Down

0 comments on commit 9eed55b

Please sign in to comment.