Skip to content

Commit

Permalink
Don't warn when dismissing two layers of tree nav (#3037)
Browse files Browse the repository at this point in the history
Currently, popping two layers in a nav tree will cause intermediate,
invalid stores to send `dismiss` actions when they shouldn't. This
branch avoids this by checking the store's validity before sending the
action along.

Fixes #3031.
  • Loading branch information
stephencelis committed Apr 30, 2024
1 parent 9de16b3 commit b5f3786
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
#endif
}
set {
if newValue == nil, self.state[keyPath: state] != nil {
if newValue == nil, self.state[keyPath: state] != nil, !self._isInvalidated() {
self.send(action(.dismiss))
}
}
Expand Down

0 comments on commit b5f3786

Please sign in to comment.