mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
Null out mainPath on resolve errors
The scope of this variable is outside the loop so this prevent cache corruption based on using the mainPath value from previous module. Refs atom/atom-space-pen-views#5
This commit is contained in:
parent
fb3cc5554c
commit
97e0ddf15d
@ -59,6 +59,8 @@ loadDependencies = (modulePath, rootPath, rootMetadata, moduleCache) ->
|
||||
if childMetadata?.version
|
||||
try
|
||||
mainPath = require.resolve(childPath)
|
||||
catch error
|
||||
mainPath = null
|
||||
|
||||
if mainPath
|
||||
moduleCache.dependencies.push
|
||||
|
Loading…
Reference in New Issue
Block a user