@@ -602,11 +602,11 @@ export class StackService {
602
602
* If the branch is part of a stack and if the stackId is provided, this will include only the changes up to the next branch in the stack.
603
603
* Otherwise, if stackId is not provided, this will include all changes as compared to the target branch
604
604
*/
605
- branchChanges ( args : { projectId : string ; stackId ?: string ; branch : BranchRef } ) {
605
+ branchChanges ( args : { projectId : string ; stackId ?: string | null ; branch : BranchRef } ) {
606
606
return this . api . endpoints . branchChanges . useQuery (
607
607
{
608
608
projectId : args . projectId ,
609
- stackId : args . stackId ,
609
+ stackId : args . stackId === 'null' ? null : args . stackId ,
610
610
branch : args . branch
611
611
} ,
612
612
{
@@ -618,11 +618,11 @@ export class StackService {
618
618
) ;
619
619
}
620
620
621
- branchChange ( args : { projectId : string ; stackId ?: string ; branch : BranchRef ; path : string } ) {
621
+ branchChange ( args : { projectId : string ; stackId ?: string | null ; branch : BranchRef ; path : string } ) {
622
622
return this . api . endpoints . branchChanges . useQuery (
623
623
{
624
624
projectId : args . projectId ,
625
- stackId : args . stackId ,
625
+ stackId : args . stackId === 'null' ? null : args . stackId ,
626
626
branch : args . branch
627
627
} ,
628
628
{ transform : ( result ) => changesSelectors . selectById ( result . changes , args . path ) }
@@ -631,14 +631,14 @@ export class StackService {
631
631
632
632
async branchChangesByPaths ( args : {
633
633
projectId : string ;
634
- stackId ?: string ;
634
+ stackId ?: string | null ;
635
635
branch : BranchRef ;
636
636
paths : string [ ] ;
637
637
} ) {
638
638
const result = await this . api . endpoints . branchChanges . fetch (
639
639
{
640
640
projectId : args . projectId ,
641
- stackId : args . stackId ,
641
+ stackId : args . stackId === 'null' ? null : args . stackId ,
642
642
branch : args . branch
643
643
} ,
644
644
{ transform : ( result ) => selectChangesByPaths ( result . changes , args . paths ) }
@@ -1185,7 +1185,7 @@ function injectEndpoints(api: ClientState['backendApi'], uiState: UiState) {
1185
1185
} ) ,
1186
1186
branchChanges : build . query <
1187
1187
{ changes : EntityState < TreeChange , string > ; stats : TreeStats } ,
1188
- { projectId : string ; stackId ?: string ; branch : BranchRef }
1188
+ { projectId : string ; stackId ?: string | null ; branch : BranchRef }
1189
1189
> ( {
1190
1190
extraOptions : { command : 'changes_in_branch' } ,
1191
1191
query : ( args ) => args ,
0 commit comments