Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Commit 629a0a5

Browse files
WliuWliu
authored andcommitted
Activate package when deserializing
1 parent 843f91c commit 629a0a5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/package.coffee

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class Package
2626
mainModule: null
2727
mainInitialized: false
2828
mainActivated: false
29+
deserialized: false
2930

3031
###
3132
Section: Construction
@@ -380,6 +381,7 @@ class Package
380381
@deserializerManager.add
381382
name: deserializerName,
382383
deserialize: (state, atomEnvironment) =>
384+
@deserialized = true
383385
@registerViewProviders()
384386
@requireMainModule()
385387
@initializeIfNeeded()
@@ -611,7 +613,7 @@ class Package
611613
@mainModulePath = fs.resolveExtension(mainModulePath, ["", CompileCache.supportedExtensions...])
612614

613615
activationShouldBeDeferred: ->
614-
@hasActivationCommands() or @hasActivationHooks() or @hasDeferredURIHandler()
616+
(@hasActivationCommands() or @hasActivationHooks() or @hasDeferredURIHandler()) and not @deserialized
615617

616618
hasActivationHooks: ->
617619
@getActivationHooks()?.length > 0

0 commit comments

Comments
 (0)