This pull request adds an optional chaining operator to the events.domElement property when calling removeEventListener. This means that this will no longer error out when the Pixi prematurely destroys the domElement ahead of pixi-viewport.
Also removes the need to do this in userland for @pixi/react:
Fixes #438
This pull request adds an optional chaining operator to the
events.domElement
property when callingremoveEventListener
. This means that this will no longer error out when the Pixi prematurely destroys the domElement ahead of pixi-viewport.Also removes the need to do this in userland for @pixi/react:
I've tested this locally using
pnpm patch
on my application and it works wonders.