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";
6767 */
6868export const DEFAULT_DISTRIBUTION_VERSION_RANGE : Range = new Range ( "2.x" ) ;
6969
70- interface DistributionState {
70+ export interface DistributionState {
7171 folderIndex : number ;
7272 release : Release | null ;
7373}
@@ -329,10 +329,11 @@ class ExtensionSpecificDistributionManager {
329329 // If the file doesn't exist, that just means we need to create it
330330
331331 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 ,
336337 release : ( this . extensionContext . globalState . get (
337338 "distributionRelease" ,
338339 ) ?? null ) as Release | null ,
@@ -647,7 +648,7 @@ class ExtensionSpecificDistributionManager {
647648 await this . updateState ( ( oldState ) => {
648649 return {
649650 ...oldState ,
650- folderIndex : oldState . folderIndex + 1 ,
651+ folderIndex : ( oldState . folderIndex ?? 0 ) + 1 ,
651652 } ;
652653 } ) ;
653654 }
You can’t perform that action at this time.
0 commit comments