Skip to content

Commit

Permalink
feat(JTransition): safeguard for fragment nodes (#2516)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferferga authored Nov 29, 2024
1 parent 944506a commit 9c4beaf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/components/lib/JTransition.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
onNoLeave();
$attrs.onLeaveCancelled?.();
}">
<slot />
<!-- Transition only supports a single child, so we handle a possible misuse here wrapping if necessary -->
<span v-if="$slots.default().length > 1 && !group">
<slot />
</span>
<slot v-else />
</component>
</template>
Expand Down

0 comments on commit 9c4beaf

Please sign in to comment.