Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InteractionCallback getting passed as null to pixi layers findHit, resulting in error #69

Closed
Redmega opened this issue Jun 28, 2021 · 1 comment

Comments

@Redmega
Copy link

Redmega commented Jun 28, 2021

plugins.interaction.hitTest sends null for the InteractionCallback of processInteractive, which in turn drills down to @pixi/layers this._finishInteractionProcess which calls it without actually checking that it exists/is callable.

https://github.com/pixijs/pixi-layers/blob/75c4078445b30f27cca153cfb931e37bff734edd/src/LayersTreeSearch.ts#L180-L182

You check that func exists when processing the second queue item, but not the first. Is this just an oversight or is there a reason for that?

If you look at the same function in the v5 branch, it seems like it's much more careful about what it's passed:
https://github.com/pixijs/pixi-layers/blob/4b5b29d6f1770fb0d40f21848bd7b35e00a6a931/src/LayersTreeSearch.ts#L153-L163

@Redmega
Copy link
Author

Redmega commented Feb 8, 2022

Closed by #77

@Redmega Redmega closed this as completed Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant