react-native-pdf icon indicating copy to clipboard operation
react-native-pdf copied to clipboard

fix: an issue that crashes when cancel is not present

Open ajakka opened this issue 1 year ago • 3 comments

I have a use case where the user swipes multiple pdf files, and when the pdf is still loading and user swipes it, the cancel function get fired before its initialized. I fixed it by checking if the cancel function exists before calling it.

ajakka avatar Jul 15 '24 09:07 ajakka

@wonday could you please merge this asap, it's a simple change yet it crashes apps in production, I have to manually change it in node_modules every time a yarn install is invoked.

ajakka avatar Jul 31 '24 09:07 ajakka

@ajakka you can use patch-package to apply your fix locally after every yarn install without waiting for the PR to be merged.

wise-danya avatar Sep 21 '24 14:09 wise-danya

@wise-danya Thank you, this helps a lot.

ajakka avatar Sep 22 '24 02:09 ajakka