File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -152,13 +152,17 @@ async function bootstrapExtension(config: Config, state: PersistentState): Promi
152152 return ;
153153 } ;
154154
155- const lastCheck = state . lastCheck ;
156155 const now = Date . now ( ) ;
156+ if ( config . package . releaseTag === NIGHTLY_TAG ) {
157+ // Check if we should poll github api for the new nightly version
158+ // if we haven't done it during the past hour
159+ const lastCheck = state . lastCheck ;
157160
158- const anHour = 60 * 60 * 1000 ;
159- const shouldDownloadNightly = state . releaseId === undefined || ( now - ( lastCheck ?? 0 ) ) > anHour ;
161+ const anHour = 60 * 60 * 1000 ;
162+ const shouldCheckForNewNightly = state . releaseId === undefined || ( now - ( lastCheck ?? 0 ) ) > anHour ;
160163
161- if ( ! shouldDownloadNightly ) return ;
164+ if ( ! shouldCheckForNewNightly ) return ;
165+ }
162166
163167 const release = await fetchRelease ( "nightly" ) . catch ( ( e ) => {
164168 log . error ( e ) ;
You can’t perform that action at this time.
0 commit comments