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

Analytics.trackEvent doesn't allow message with no props #201

Closed
raymondchooi opened this issue Dec 19, 2017 · 1 comment
Closed

Analytics.trackEvent doesn't allow message with no props #201

raymondchooi opened this issue Dec 19, 2017 · 1 comment
Labels

Comments

@raymondchooi
Copy link

raymondchooi commented Dec 19, 2017

Expected behaviour

Analytics.trackEvent("Log in successful."); should run without errors

Actual behaviour

Error:
undefined is not an object (evaluating 'Object.keys(props)')
in Analytics.js:26:16

Steps to reproduce

Possible solution

Add default props to equal null and add early break in Analytics.js:20:

function sanitizeProperties(props = null) {
    if(props === null) {
        return {};
    }
....
@dhei
Copy link
Member

dhei commented Dec 19, 2017

@raymondchooi thanks for reporting.👍
We will fix this in our next release.

@guperrot guperrot added the bug label Dec 19, 2017
@dhei dhei closed this as completed Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants