Merge pull request #113 from MoOx/cleanup/analytics

Cleanup default analytics function
This commit was merged in pull request #113.
This commit is contained in:
Robin North
2018-01-25 07:50:59 +00:00
committed by GitHub
4 changed files with 46 additions and 52 deletions

View File

@@ -279,7 +279,9 @@ Pjax.prototype = {
// Fire Events
trigger(document,"pjax:complete pjax:success", state.options)
state.options.analytics()
if (typeof state.options.analytics === "function") {
state.options.analytics()
}
if (state.options.history) {
// First parse url and check for hash to override scroll