Skip to content

Commit

Permalink
return nil instead of self when no action available
Browse files Browse the repository at this point in the history
  • Loading branch information
demarey committed Jun 13, 2024
1 parent 3beb538 commit 34e1541
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Spec2-Core/SpAbstractPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ SpAbstractPresenter >> withAdapterDo: aValuable [
{ #category : 'private - utilities' }
SpAbstractPresenter >> withWindowDo: aValuable [

self hasWindow ifFalse: [ ^ self ].
self hasWindow ifFalse: [ ^ nil ].
"Since Presenter has window, root = window"
^ aValuable value: self root
]
2 changes: 1 addition & 1 deletion src/Spec2-Core/SpDialogWindowPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,6 @@ SpDialogWindowPresenter >> triggerOkAction [
"Trigger defined ok action.
See `SpDialogWindowPresenter>>#okAction:`"

okAction ifNil: [ ^ self ].
okAction ifNil: [ ^ nil ].
^ okAction cull: self
]

0 comments on commit 34e1541

Please sign in to comment.