From 6f2b87c1698cbb52183e3f446b5acc9c98a9dad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20G=C3=B3mez=20V=C3=A1squez?= Date: Thu, 8 Mar 2018 11:52:52 +0100 Subject: [PATCH] Clear Interval if the component doesn't have the $el property Using the vuelidate plugin creates components that do not have an $el property, but still have _hasMetaInfo set to true, which results in the setInterval never being cleared. There may be other plugins that create similar components. Changing the line to if (this.$el && this.$el.offsetParent !== null) return would resolve this issue. --- src/shared/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/plugin.js b/src/shared/plugin.js index a493dcc..1649348 100644 --- a/src/shared/plugin.js +++ b/src/shared/plugin.js @@ -87,7 +87,7 @@ export default function VueMeta (Vue, options = {}) { if (this._hasMetaInfo) { // Wait that element is hidden before refreshing meta tags (to support animations) const interval = setInterval(() => { - if (this.$el.offsetParent !== null) return + if (this.$el && this.$el.offsetParent !== null) return clearInterval(interval) batchID = batchUpdate(batchID, () => this.$meta().refresh()) }, 50)