Skip to content

Commit e59c272

Browse files
committed
revert: Silly broken code
1 parent 0a8ccf7 commit e59c272

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,7 @@ function Slot(props, context) {
177177
}
178178
}
179179
};
180-
const { useFragment, ...rest } = props;
181-
return h(useFragment ? Fragment : 'slot', { ...rest, ref });
180+
return h('slot', { ...props, ref });
182181
}
183182

184183
function toVdom(element, nodeName, options) {
@@ -210,9 +209,8 @@ function toVdom(element, nodeName, options) {
210209
const shadow = !!(options && options.shadow);
211210

212211
// Only wrap the topmost node with a slot
213-
const wrappedChildren = nodeName
214-
? h(Slot, { useFragment: !shadow }, children)
215-
: children;
212+
const wrappedChildren =
213+
nodeName && shadow ? h(Slot, null, children) : children;
216214

217215
if (!shadow && nodeName) {
218216
element.innerHTML = '';

0 commit comments

Comments
 (0)