Open douglasg14b opened 4 years ago
I also met
I also met
?
Try to use v-show
instead of v-if
on the root elements. Maybe this helps.
My solution was to use a render
function. I converted this
<template>
<Fragment v-if="matches">
<slot></slot>
</Fragment>
</template>
to this
render(createElement) {
let { $slots, matches } = this;
let children = matches ? $slots.default : undefined;
return createElement(Fragment, {}, children);
}
And now it works without problems
Congrats you just converted
<template>
<Fragment v-if="matches">
<slot></slot>
</Fragment>
</template>
To
<template>
<Fragment>
<slot v-if="matches"></slot>
</Fragment>
</template>
You are absolutely right
I'm using a fragment with a slot, which seems to be the cause? The above error occurs every time I change router views while the below component is the root element for the routes component.