@torpor/view 0.0.10 → 0.0.11

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @torpor/view
2
2
 
3
+ ## 0.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - 78e78b9: Fix: use the existing fragment name
8
+
3
9
  ## 0.0.10
4
10
 
5
11
  ### Patch Changes
package/dist/compile.cjs CHANGED
@@ -1173,7 +1173,7 @@ function buildHtmlBranch(node, status, b, parentName, rangeName) {
1173
1173
  status.imports.add("t_run_branch");
1174
1174
  b.append(`t_run_branch(${rangeName}, -1, () => {`);
1175
1175
  const templateName = nextVarName("template", status);
1176
- const fragmentName = nextVarName("fragment", status);
1176
+ const fragmentName = `t_fragment_${node.fragment.number}`;
1177
1177
  b.append(`const ${templateName} = document.createElement("template");`);
1178
1178
  b.append(`${templateName}.innerHTML = ${node.statement};`);
1179
1179
  b.append(`let ${fragmentName} = ${templateName}.content.cloneNode(true) as DocumentFragment;`);