File tree Expand file tree Collapse file tree 2 files changed +371
-7
lines changed
test/vscode-tests/no-workspace/codeql-cli Expand file tree Collapse file tree 2 files changed +371
-7
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ const NIGHTLY_DISTRIBUTION_REPOSITORY_NWO = "dsp-testing/codeql-cli-nightlies";
67
67
*/
68
68
export const DEFAULT_DISTRIBUTION_VERSION_RANGE : Range = new Range ( "2.x" ) ;
69
69
70
- interface DistributionState {
70
+ export interface DistributionState {
71
71
folderIndex : number ;
72
72
release : Release | null ;
73
73
}
@@ -329,10 +329,11 @@ class ExtensionSpecificDistributionManager {
329
329
// If the file doesn't exist, that just means we need to create it
330
330
331
331
this . distributionState = {
332
- folderIndex : this . extensionContext . globalState . get (
333
- "distributionFolderIndex" ,
334
- 0 ,
335
- ) ,
332
+ folderIndex :
333
+ this . extensionContext . globalState . get (
334
+ "distributionFolderIndex" ,
335
+ 0 ,
336
+ ) ?? 0 ,
336
337
release : ( this . extensionContext . globalState . get (
337
338
"distributionRelease" ,
338
339
) ?? null ) as Release | null ,
@@ -647,7 +648,7 @@ class ExtensionSpecificDistributionManager {
647
648
await this . updateState ( ( oldState ) => {
648
649
return {
649
650
...oldState ,
650
- folderIndex : oldState . folderIndex + 1 ,
651
+ folderIndex : ( oldState . folderIndex ?? 0 ) + 1 ,
651
652
} ;
652
653
} ) ;
653
654
}
You can’t perform that action at this time.
0 commit comments