vue-lazy-hydration icon indicating copy to clipboard operation
vue-lazy-hydration copied to clipboard

Test that el is an Element

Open weotch opened this issue 4 years ago • 0 comments

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).

weotch avatar Jun 11 '20 22:06 weotch