diff --git a/src/shared/plugin.js b/src/shared/plugin.js index 61710ee..6cb7ce5 100644 --- a/src/shared/plugin.js +++ b/src/shared/plugin.js @@ -60,13 +60,17 @@ export default function VueMeta (Vue, options = {}) { }, beforeMount () { // batch potential DOM updates to prevent extraneous re-rendering - batchID = batchUpdate(batchID, () => this.$meta().refresh()) + if (this.$metaInfo) { + batchID = batchUpdate(batchID, () => this.$meta().refresh()) + } }, destroyed () { // do not trigger refresh on the server side if (this.$isServer) return // re-render meta data when returning from a child component to parent - batchID = batchUpdate(batchID, () => this.$meta().refresh()) + if (this.$metaInfo) { + batchID = batchUpdate(batchID, () => this.$meta().refresh()) + } } }) }