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

Make sure to always trigger a callback in JS trigger when specified #13855

Merged
merged 5 commits into from Dec 13, 2018

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Dec 13, 2018

No description provided.

@tsteur tsteur added the Needs Review PRs that need a code review label Dec 13, 2018
@tsteur tsteur added this to the 3.8.0 milestone Dec 13, 2018
js/piwik.js Outdated
@@ -3561,6 +3568,10 @@ if (typeof window.Piwik !== 'object') {
return false;
}

if (success && typeof callback === 'function') {
callback({request: request, trackerUrl: configTrackerUrl, success: true});
Copy link
Member

Choose a reason for hiding this comment

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

Since this assumes success, would it help to add, eg, isSendBeacon: true? Just in case someone might want to tell. I'm not sure of a use case for that though.

Copy link
Member Author

Choose a reason for hiding this comment

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

doesn't hurt 👍 will add it

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants