Closed napro8509 closed 2 years ago
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch react-native-modal-popover@2.1.0 for the project I'm working on.
react-native-modal-popover@2.1.0
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-modal-popover/lib/usePopover.js b/node_modules/react-native-modal-popover/lib/usePopover.js index 75cc72a..820f98d 100644 --- a/node_modules/react-native-modal-popover/lib/usePopover.js +++ b/node_modules/react-native-modal-popover/lib/usePopover.js @@ -45,9 +45,9 @@ function usePopover(calculateStatusBar = false) { requestAnimationFrame(openPopover); } }; - react_native_1.Dimensions.addEventListener('change', onOrientationChange); + const listener = react_native_1.Dimensions.addEventListener('change', onOrientationChange); return () => { - react_native_1.Dimensions.removeEventListener('change', onOrientationChange); + listener?.remove?.(); }; }, [showPopover, openPopover]); return result;
This issue body was partially generated by patch-package.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
react-native-modal-popover@2.1.0
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.