Vuetify Version: 2.2.3
Vue Version: 2.6.11
Browsers: Chrome 79.0.3945.117
OS: Mac OS 10.15.2
V-skeleton-loader works similar to a v-if component and does therefore only render the content in the default slot once the loading flag is false.
The undefined object is accessed even when the skeleton loader is still loading. The slot is not rendered conditionally
https://codepen.io/ellazlo/pen/GRgGovK
Is there any workaround? Is this the intended behaviour? If yes than it's kinda unpractical for data fetching, or am I misunderstanding something here?
This would happen with any custom component: https://codepen.io/johnjleider/pen/oNgyxWX?editors=1011
If you have any additional questions, please reach out to us in our Discord community.
Only if you don't conditionally render the slot: https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/components/VSkeletonLoader/VSkeletonLoader.ts#L146
Vue renders slots when proxying them to this.$slots, so it's still broken unless you use a scoped slot: https://codepen.io/kaelwd/pen/qBEKNYP
This v-slot trick should definitely go into the documentation.