Merge pull request #14116 from atom/as-main-module-path-variable

Assign `Package.prototype.mainModulePath` eagerly for preloaded packages
This commit is contained in:
Antonio Scandurra 2017-04-03 14:48:35 +02:00 committed by GitHub
commit d9ebd7e125

View File

@ -102,6 +102,10 @@ class Package
@path = path.join(@packageManager.resourcePath, @path)
@loadStylesheets()
# Unfortunately some packages are accessing `@mainModulePath`, so we need
# to compute that variable eagerly also for preloaded packages.
@getMainModulePath()
load: ->
@measure 'loadTime', =>
try