Skip to content

Commit

Permalink
Merge pull request #167 from btkostner/patch-1
Browse files Browse the repository at this point in the history
Fix document is not defined error with SSR
  • Loading branch information
Atinux committed Dec 7, 2017
2 parents d2b0933 + 4c3e2e3 commit d3557fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function VueMeta (Vue, options = {}) {
// if computed $metaInfo exists, watch it for updates & trigger a refresh
// when it changes (i.e. automatically handle async actions that affect metaInfo)
// credit for this suggestion goes to [Sébastien Chopin](https://github.com/Atinux)
if (this.$metaInfo) {
if (!this.$isServer && this.$metaInfo) {
this.$watch('$metaInfo', () => {
// batch potential DOM updates to prevent extraneous re-rendering
batchID = batchUpdate(batchID, () => this.$meta().refresh())
Expand Down

0 comments on commit d3557fa

Please sign in to comment.