Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite59c272

Browse files
committed
revert: Silly broken code
1 parent0a8ccf7 commite59c272

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-
returnh(useFragment ?Fragment :'slot',{ ...rest, ref});
180+
returnh('slot',{ ...props, ref});
182181
}
183182

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

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

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp