Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix faulty import of JSONP transport to React Native and NativeScript #726

Merged
merged 2 commits into from
Mar 25, 2021

Conversation

owenpearson
Copy link
Member

Resolves an issue which would cause the library to throw an error on import in React Native and NativeScript.

To summarise, the issue was that each platform was using an array of 'Transports' and explicitly initialising each one as soon as the library is loaded, but it was also using null-loader to omit the JSONP platform from React Native and NativeScript builds so it was essentially attempting to initialise an empty module as if it were a Transport. This PR adds a separate array of transports without JSONP to fix this error.

This PR would also allow React Native users to use the ably NPM module directly since the recent work around ES6 modules displaces the need for the ably-js-react-native wrapper.

@owenpearson owenpearson merged commit cd94ea9 into main Mar 25, 2021
@owenpearson owenpearson deleted the feature/react-native-transport-fix branch March 25, 2021 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants