vue-lazy-hydration
vue-lazy-hydration copied to clipboard
Test that el is an Element
This is a simplification of the changes proposed in #51, specifically this line.
My use case was a scenario like this:
<lazy-hydrate when-visible>
<my-component v-if='false'></my-component>
</lazy-hydrate>
In this case, this.$el.
is a Comment and throws this error:
TypeError: Failed to execute 'observe' on 'IntersectionObserver': parameter 1 is not of type 'Element'.
... on this line. This appears to only be an issue during SSR (as opposed to SSG).