mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Assign Package.prototype.mainModulePath eagerly for preloaded packages
Many packages currently use this instance variable instead of calling `Package.prototype.getMainModulePath`. With this commit we will eagerly compute it for preloaded packages too and therefore prevent third party packages that rely on this implementation detail from breaking.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user