mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
Check cache before atom require short-circuit
This commit is contained in:
@@ -102,8 +102,6 @@ resolveFilePath = (relativePath, parentModule) ->
|
||||
return
|
||||
|
||||
resolveModulePath = (relativePath, parentModule) ->
|
||||
return cache.atomExportsPath if relativePath is 'atom'
|
||||
|
||||
return unless relativePath
|
||||
return unless parentModule?.id
|
||||
|
||||
@@ -115,7 +113,11 @@ resolveModulePath = (relativePath, parentModule) ->
|
||||
folderPath = path.dirname(parentModule.id)
|
||||
|
||||
range = cache.folders[folderPath]?[relativePath]
|
||||
return unless range?
|
||||
unless range?
|
||||
if relativePath is 'atom'
|
||||
return cache.atomExportsPath
|
||||
else
|
||||
return
|
||||
|
||||
candidates = cache.dependencies[relativePath]
|
||||
return unless candidates?
|
||||
|
||||
Reference in New Issue
Block a user