File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -74,9 +74,6 @@ async function activate(
74
74
// Get a reference to the default file browser extension
75
75
const filebrowser = factory . defaultBrowser ;
76
76
77
- // Wait for the application and file browser extension to be restored:
78
- await Promise . all ( [ app . restored , filebrowser . model . restored ] ) ;
79
-
80
77
// Attempt to load application settings
81
78
try {
82
79
settings = await settingRegistry . load ( plugin . id ) ;
@@ -86,8 +83,10 @@ async function activate(
86
83
// Create the Git model
87
84
const gitExtension = new GitExtension ( app , settings ) ;
88
85
89
- // Sync the Git extension path with the file browser extension's current path
90
- gitExtension . pathRepository = filebrowser . model . path ;
86
+ // Whenever we restore the application, sync the Git extension path
87
+ Promise . all ( [ app . restored , filebrowser . model . restored ] ) . then ( ( ) => {
88
+ gitExtension . pathRepository = filebrowser . model . path ;
89
+ } ) ;
91
90
92
91
// Whenever the file browser path changes, sync the Git extension path
93
92
filebrowser . model . pathChanged . connect (
You can’t perform that action at this time.
0 commit comments