fix(core): allow non-element slot child

This commit is contained in:
Ayo 2023-11-09 11:56:20 +01:00
parent db95acc488
commit 111c53d2fb
3 changed files with 3 additions and 3 deletions

2
package-lock.json generated
View file

@ -4002,7 +4002,7 @@
},
"packages/core": {
"name": "@mcflyjs/core",
"version": "0.3.0",
"version": "0.3.1",
"license": "MIT",
"dependencies": {
"esprima": "^4.0.1",

View file

@ -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'];

View file

@ -1,6 +1,6 @@
{
"name": "@mcflyjs/core",
"version": "0.3.0",
"version": "0.3.1",
"description": "McFly core package",
"type": "module",
"main": "index.js",