2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-06 02:52:24 +03:00

Merge pull request #167 from btkostner/patch-1

Fix document is not defined error with SSR
This commit is contained in:
Sébastien Chopin
2017-12-07 12:50:51 +01:00
committed by GitHub
+1 -1
View File
@@ -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())