@zubra/runtime 5.1.1 → 5.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1024,10 +1024,11 @@ function routeChildren(host, context, slots, tag) {
1024
1024
  for (const node of actual) if (node.nodeType === 1 && slotName(node) !== slot.name) insert(node, null);
1025
1025
  show(slot);
1026
1026
  }
1027
- // Content a parent adds inside a slot itself (its zb-if or zb-each there) is slotted too.
1027
+ // Content a parent adds inside a slot itself (its zb-if or zb-each there) is slotted too;
1028
+ // a fallback showing there is the component's own, so it stays unmarked.
1028
1029
  if (context.slotted) {
1029
1030
  for (const slot of context.slots.values()) {
1030
- if (!slot.region) continue;
1031
+ if (!slot.region?.provided) continue;
1031
1032
  for (let node = slot.region.open.nextSibling; node && node !== slot.region.close; node = node.nextSibling) {
1032
1033
  mark(node, context.slotted);
1033
1034
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zubra/runtime",
3
- "version": "5.1.1",
3
+ "version": "5.1.2",
4
4
  "description": "Browser runtime for Zubra compiled components, built on the TC39 Signals API",
5
5
  "license": "ISC",
6
6
  "repository": {
package/src/element.js CHANGED
@@ -1039,10 +1039,11 @@ function routeChildren(host, context, slots, tag) {
1039
1039
  for (const node of actual) if (node.nodeType === 1 && slotName(node) !== slot.name) insert(node, null);
1040
1040
  show(slot);
1041
1041
  }
1042
- // Content a parent adds inside a slot itself (its zb-if or zb-each there) is slotted too.
1042
+ // Content a parent adds inside a slot itself (its zb-if or zb-each there) is slotted too;
1043
+ // a fallback showing there is the component's own, so it stays unmarked.
1043
1044
  if (context.slotted) {
1044
1045
  for (const slot of context.slots.values()) {
1045
- if (!slot.region) continue;
1046
+ if (!slot.region?.provided) continue;
1046
1047
  for (let node = slot.region.open.nextSibling; node && node !== slot.region.close; node = node.nextSibling) {
1047
1048
  mark(node, context.slotted);
1048
1049
  }