Skip to content

Commit

Permalink
fix: pageTitle is not available on SSR
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 23, 2020
1 parent 9434562 commit 228d796
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function startPageTracking(ctx) {
routeName: to.name,
pageType: 'PageView',
pageUrl: to.fullPath,
pageTitle: document.title,
pageTitle: (typeof document !== 'undefined' && document.title) || '',
event: '<%= options.pageViewEventName %>'
})
}, 250)
Expand Down

0 comments on commit 228d796

Please sign in to comment.