react-native-clipboard / clipboard

React Native Clipboard API for both iOS and Android.
MIT License
690 stars 142 forks source link

fix: calls to listenerCount throw for RN 0.64+ #108

Closed tungv closed 3 years ago

tungv commented 3 years ago

Overview

if it's not polyfilled, extracted listenerCount will lose context, and this will be undefined.

Test Plan

Before this change, calls like this

Clipboard.addListener(handler);

will throw on app with React native version of 0.64 or newer

cristianoccazinsp commented 3 years ago

Awesome, looks like I left this bugged still for RN 0.64. Thank you for taking care of it, hopefully this is the last update @Naturalclar

tungv commented 3 years ago

@cristianoccazinsp hi, is there any updates on this one?

Naturalclar commented 3 years ago

@tungv Published new version v1.8.3 :tada: thank you!

tungv commented 3 years ago

thanks!!

jeffryang24 commented 3 years ago

Hmm... v1.8.3 hasn't been published in the npm registry, just checked using npm info and the latest version is still 1.8.2. :bow:

npm info @react-native-clipboard/clipboard versions
[ '1.6.0', '1.7.0-rc.0', '1.7.0', '1.8.0', '1.8.1', '1.8.2' ]

cc: @Naturalclar

Naturalclar commented 3 years ago

@jeffryang24 sorry about that! it seems like ive released the tag but havent published on npm v1.8.3 should now be availbale on npm

jeffryang24 commented 3 years ago

Nice... Thank you, sorry for bothering your weekend.. :bow: