Skip to content

fix: Use default event dispatcher in React Native entry point when none provided by user #383

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

Merged
merged 2 commits into from
Dec 30, 2019

Conversation

mjc1283
Copy link
Contributor

@mjc1283 mjc1283 commented Dec 27, 2019

Summary

In the createInstance factory method of the React Native entry point, when no event dispatcher is provided by the caller in the options object, a value of undefined is set on the options object that is passed on to the Optimizely constructor. This results in an invalid instance that can't dispatch events.

With this fix, the default event dispatcher is used when none is provided by the caller.

Test plan

Added new unit test

@coveralls
Copy link

coveralls commented Dec 27, 2019

Coverage Status

Coverage increased (+0.02%) to 97.555% when pulling 06bd65f on mcarroll/rn-default-ed into bbdb2cc on master.

Copy link
Contributor

@mikeproeng37 mikeproeng37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mjc1283 mjc1283 merged commit d61281b into master Dec 30, 2019
@mjc1283 mjc1283 deleted the mcarroll/rn-default-ed branch December 30, 2019 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants