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

useCssVars throw error when instance.subTree is null #7015

Closed
m0ksem opened this issue Nov 3, 2022 · 1 comment
Closed

useCssVars throw error when instance.subTree is null #7015

m0ksem opened this issue Nov 3, 2022 · 1 comment

Comments

@m0ksem
Copy link

m0ksem commented Nov 3, 2022

Vue version

3.2.41

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-4m67zb?file=src/App.vue
SFC

Steps to reproduce

  • Make component to use v-bind in css
  • Pass slot where error throws

What is expected?

Expect only ''Error: a" shown as error

What is actually happening?

Throws "TypeError: can't access property "shapeFlag", vnode is null" in addition to "a"

System Info

No response

Any additional comments?

Should be easy to fix.

const setVars = () => instance.subTree && setVarsOnVNode(instance.subTree, getter(instance.proxy));

Originally come from here: https://github.com/epicmaxco/vuestic-ui/issues/2614

@posva
Copy link
Member

posva commented Nov 3, 2022

A computed property (or your template) shouldn't throw an error. If you have a realistic reproduction that does create the same situation, please share it.

I checked the issue you linked and the problem is the Error global is not available in the template. I'm not sure if this is intentional so I opened #7018

@posva posva closed this as completed Nov 3, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants