BKWLD/vue-ssr-carousel

TypeError: Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element'.

ryansegus opened this issue · 5 comments

Hello, I am trying to implement this plugin in a Nuxt 2 application and it keeps crashing when navigating from page to page, everything else works wonder.

I also see the same error on your examples pages inspecting the console.

I saw this issue #67 and I though I could use a destroy method myself but I don't think is going any further. Is there any way to avoid this error when navigating?

weotch commented

I think this issues was introduced in #120 ... can you try going back to 2.1.0 and see if that fixes the issue?

weotch commented

@mattaebersold are you seeing this issue on the project you wrote that PR for?

@weotch no I didn't

I did solved yesterday wrapping the slider in a div with a v-if, I will give a try downgrading to 2.1.0 and let you know.

<div v-if="slides.length">
   <SsrCarousel ref="carousel" :key="slides.length" show-arrows>
     ... slides and arrows templates here
   </SsrCarousel>
</div>

I think this issues was introduced in #120 ... can you try going back to 2.1.0 and see if that fixes the issue?

Nothing, same error on this line return this.resizeObserver.observe(this.$el);