_resolveDef function access props but it is undefined
Vue version
^3.2.40
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-bjiedl?file=src/App.vue
Steps to reproduce
- npm run dev
- check console, will receive error:
Uncaught TypeError: Cannot read properties of undefined (reading 'dataV7a7a37b1') at resolve2 (vue.js?v=f51652de:7665:28)
I am not sure vue version is 3.2.37.. I console log the varible in debuuger
What is expected?
Webcomponent can success render.
What is actually happening?
In runtime-dom.esm-bundler.js _resolveDef function props is undefined.
System Info
System:
OS: Windows 10 10.0.19044
CPU: (12) x64 Intel(R) Core(TM) i5-10600KF CPU @ 4.10GHz
Memory: 4.34 GB / 15.91 GB
Binaries:
Node: 16.13.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (106.0.1370.42)
Internet Explorer: 11.0.19041.1566
npmPackages:
vue: ^3.2.38 => 3.2.41
Any additional comments?
No response
We should also check the props
is not undefined
PR welcome.
I did a PR for that already months ago. Seems ro have been drowned out a bit. #6182
So this issue is a duplicate, but the original issue seems to have been closed by the author.
So we'll leave this one.
i think a workaround was to define an empty props object in the component? Not sure, can't test right now
@LinusBorg Thanks. It works.
<script lang="ts" setup>
defineProps<{ somePatch: string }>();
</script>
Please don't close it, it's still so a bug 😅
I found this bug had been resolved and merged into master. I am a inexperienced programmer. I want to ask when vue will release a new version after pr is merged? I know it is not a important bug. Just want to learn the vue's release plan.