@@ -1171,7 +1171,7 @@ export class DiffFile {
11711171 } ;
11721172
11731173 onSplitHunkExpand = ( dir : "up" | "down" | "all" | "up-all" | "down-all" , index : number , needTrigger = true ) => {
1174- if ( this . getExpandEnabled ( ) ) return ;
1174+ if ( ! this . getExpandEnabled ( ) ) return ;
11751175
11761176 const current = this . #splitHunksLines?. [ index ] ;
11771177
@@ -1306,7 +1306,7 @@ export class DiffFile {
13061306
13071307 // TODO! support rollback?
13081308 onUnifiedHunkExpand = ( dir : "up" | "down" | "all" | "up-all" | "down-all" , index : number , needTrigger = true ) => {
1309- if ( this . getExpandEnabled ( ) ) return ;
1309+ if ( ! this . getExpandEnabled ( ) ) return ;
13101310
13111311 const current = this . #unifiedHunksLines?. [ index ] ;
13121312
@@ -1408,7 +1408,7 @@ export class DiffFile {
14081408 } ;
14091409
14101410 onAllExpand = ( mode : "split" | "unified" ) => {
1411- if ( this . getExpandEnabled ( ) ) return ;
1411+ if ( ! this . getExpandEnabled ( ) ) return ;
14121412
14131413 if ( mode === "split" ) {
14141414 Object . keys ( this . #splitHunksLines || { } ) . forEach ( ( key ) => {
@@ -1434,7 +1434,7 @@ export class DiffFile {
14341434 }
14351435
14361436 onAllCollapse = ( mode : "split" | "unified" ) => {
1437- if ( this . getExpandEnabled ( ) ) return ;
1437+ if ( ! this . getExpandEnabled ( ) ) return ;
14381438
14391439 if ( mode === "split" ) {
14401440 Object . values ( this . #splitLeftLines || { } ) . forEach ( ( item ) => {
0 commit comments