Cleanup default analytics function

This commit is contained in:
Robin North
2018-01-22 19:06:45 +00:00
parent 3205596f3e
commit f559ca2914
2 changed files with 3 additions and 7 deletions

View File

@@ -272,7 +272,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