binaryminds/react-native-sse

Cannot read property 'push' of undefined

Closed this issue · 2 comments

Hey @binaryminds , thank you for your work.

I wanted to give a try to your library, but I may have encountered a problem.

Everything's working as expected, except for custom events.

If I put a custom event like this:

es.addEventListener("topic", event => {
   console.log(">> New event", event);
});

I have the following error when building the app: Cannot read property 'push' of undefined

Any help would be appreciated :)

Hello @jcoulaud !

We're glad you are using our library! We have found the source of your problem and provided the fix in new release.
Update your dependency to version react-native-sse@1.0.5.

Let us know if everything works!

Thank you, everything's working as expected :)