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
152
152
return ;
153
153
} ;
154
154
155
- const lastCheck = state . lastCheck ;
156
155
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 ;
157
160
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 ;
160
163
161
- if ( ! shouldDownloadNightly ) return ;
164
+ if ( ! shouldCheckForNewNightly ) return ;
165
+ }
162
166
163
167
const release = await fetchRelease ( "nightly" ) . catch ( ( e ) => {
164
168
log . error ( e ) ;
You can’t perform that action at this time.
0 commit comments