Skip to content

Commit

Permalink
fix: gap list
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Aug 1, 2024
1 parent 34740a3 commit 66edd48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/GapList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ const GapList = defineComponent<
(props, ctx) => {
const tag = computed(() => props.tag || 'div');
return () => {
const defaultNodes = ctx.slots.default?.() || emptyArray;
const defaultNodes = (ctx.slots.default?.() || emptyArray).filter((n) => {
return typeof n.type !== 'symbol'; // remove comment nodes
});
const nodes: typeof defaultNodes = [];
if (defaultNodes.length > 0) {
nodes.push(defaultNodes[0]);
Expand Down

0 comments on commit 66edd48

Please sign in to comment.