Skip to content

Commit

Permalink
Actually have to return nil from selectedBranch to prevent the origin…
Browse files Browse the repository at this point in the history
…al error, even though the command is disabled
  • Loading branch information
daniels220 committed Dec 16, 2023
1 parent f839d8c commit b26aa96
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Iceberg-TipUI/IceTipResetBranchToThisCommitCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ IceTipResetBranchToThisCommitCommand class >> defaultDescription [
{ #category : 'testing' }
IceTipResetBranchToThisCommitCommand >> canBeExecuted [

^ self selectedBranch notNil and: [ self selectedBranch isBranch ]
^ self selectedBranch notNil
]

{ #category : 'executing' }
Expand Down Expand Up @@ -55,7 +55,9 @@ IceTipResetBranchToThisCommitCommand >> name [
{ #category : 'accessing' }
IceTipResetBranchToThisCommitCommand >> selectedBranch [

^ self context model
| selected |
selected := self context model.
^ (selected notNil and: [ selected isBranch ]) ifTrue: [ selected ]
]

{ #category : 'accessing' }
Expand Down

0 comments on commit b26aa96

Please sign in to comment.