File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,12 @@ export class GitPanel extends React.Component<
188
188
}
189
189
190
190
if ( this . state . inGitRepository ) {
191
+ const disableBranchOps = Boolean (
192
+ this . props . settings . composite [ 'disableBranchWithChanges' ] &&
193
+ ( ( this . state . unstagedFiles && this . state . unstagedFiles . length ) ||
194
+ ( this . state . stagedFiles && this . state . stagedFiles . length ) )
195
+ ) ;
196
+
191
197
main = (
192
198
< React . Fragment >
193
199
< BranchHeader
@@ -197,15 +203,7 @@ export class GitPanel extends React.Component<
197
203
upstreamBranch = { this . state . upstreamBranch }
198
204
stagedFiles = { this . state . stagedFiles }
199
205
data = { this . state . branches }
200
- disabled = {
201
- ( this . props . settings . composite [
202
- 'disableBranchWithChanges'
203
- ] as boolean ) &&
204
- (
205
- ( this . state . unstagedFiles && this . state . unstagedFiles . length ) ||
206
- ( this . state . stagedFiles && this . state . stagedFiles . length )
207
- )
208
- }
206
+ disabled = { disableBranchOps }
209
207
toggleSidebar = { this . toggleSidebar }
210
208
sideBarExpanded = { this . state . isHistoryVisible }
211
209
/>
You can’t perform that action at this time.
0 commit comments