Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Allow null passthrough parent (#2821)
In `CollisionPassthrough`, while searching for an ancestor with `CollisionCallbacks` mixin, `firstWhere` was used. This was causing it to fail when no such ancestor was found. But having a passthrough parent is not necessary, at least rest of the code wasn't designed on that assumption. So this PR replaced `firstWhere` with `firstWhereOrNull` allowing the passthrough to be null. This was discovered in one of the [discord discussions](https://discord.com/channels/509714518008528896/516639688581316629/1163600349643411467).
- Loading branch information
1 parent
eca7e41
commit c4d2f86
Showing
2 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters