Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'container' in $refs is undefined #105

Open
Sqweedward opened this issue Jun 3, 2021 · 1 comment
Open

'container' in $refs is undefined #105

Sqweedward opened this issue Jun 3, 2021 · 1 comment

Comments

@Sqweedward
Copy link

Sqweedward commented Jun 3, 2021

package v0.8.10 .

Exception: TypeError: Cannot read property 'children' of undefined

at VueComponent.children (vue-horizontal.esm.js?f67a:86)
at VueComponent.calculate (vue-horizontal.esm.js?f67a:232)
at VueComponent.eval (vue-horizontal.esm.js?f67a:220)
at Array.eval (vue.runtime.esm.js?ff9b:1980)
at flushCallbacks (vue.runtime.esm.js?ff9b:1906)
@Sqweedward Sqweedward changed the title Error on render $refs is undefind Jun 3, 2021
@Sqweedward Sqweedward changed the title $refs is undefind $refs is undefined Jun 3, 2021
@Sqweedward Sqweedward changed the title $refs is undefined 'container' in $refs is undefined Jun 3, 2021
@tibs245
Copy link
Contributor

tibs245 commented Dec 5, 2023

Hi, I have the same issue with SSR.

When I use <client-only></client-only> this resolve the error but I want use SSR.

It's possible to add in src/vue-horizontal.vue a '?' for prevent this error ?

    children(): HTMLCollection {
      const container = this.$refs.container as Element
      return container?.children ?? []
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants