From 223aab3b03362b92285d111430a63847b3acc010 Mon Sep 17 00:00:00 2001 From: Jacobo Tabernero Date: Fri, 2 Jun 2017 17:03:43 +0200 Subject: [PATCH] Fix 'document is not defined' in 1.0.4 version --- src/shared/plugin.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shared/plugin.js b/src/shared/plugin.js index c275bc02..7d904bba 100644 --- a/src/shared/plugin.js +++ b/src/shared/plugin.js @@ -52,6 +52,8 @@ export default function VueMeta (Vue, options = {}) { } }, created () { + // do not trigger refresh on the server side + if (this.$isServer) return // 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)