fix(core): allow non-element slot child
This commit is contained in:
parent
db95acc488
commit
111c53d2fb
3 changed files with 3 additions and 3 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -4002,7 +4002,7 @@
|
|||
},
|
||||
"packages/core": {
|
||||
"name": "@mcflyjs/core",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"esprima": "^4.0.1",
|
||||
|
|
|
@ -344,7 +344,7 @@ function replaceSlots(fragmentNode, node) {
|
|||
let nodeChildren = [];
|
||||
|
||||
if (currentSlotName === null) {
|
||||
nodeChildren = node.children.filter(child => !child.attributes?.['slot'] && child.type === ELEMENT_NODE);
|
||||
nodeChildren = node.children.filter(child => !child.attributes?.['slot']);
|
||||
} else {
|
||||
nodeChildren = node.children.filter(child => {
|
||||
const childSlotName = child.attributes?.['slot'];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@mcflyjs/core",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"description": "McFly core package",
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
|
|
Loading…
Reference in a new issue