marko 6.3.50 → 6.3.51

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.
@@ -3283,11 +3283,14 @@ function writeHTMLResumeStatements(path) {
3283
3283
  }
3284
3284
  const closureIndex = getDynamicClosureIndex(closure, section);
3285
3285
  if (closureIndex) setBindingSerializedValue(section, closure, _marko_compiler.types.numericLiteral(closureIndex), getAccessorPrefix().ClosureSignalIndex);
3286
+ const closureScopesReason = getSerializeReason(closure.section, closure, getAccessorPrefix().ClosureScopes);
3286
3287
  if (underTryPlaceholder(section)) {
3287
3288
  const reason = getSerializeReason(section);
3288
- if (reason) getHTMLSectionStatements(section).push(_marko_compiler.types.expressionStatement(getExprIfSerialized(section, reason, callRuntime("_script", getScopeIdIdentifier(section), _marko_compiler.types.stringLiteral(getResumeRegisterId(section, closure, "pending")), markerSerializeArg))));
3289
+ if (reason) {
3290
+ const script = getExprIfSerialized(section, reason, callRuntime("_script", getScopeIdIdentifier(section), _marko_compiler.types.stringLiteral(getResumeRegisterId(section, closure, "pending")), markerSerializeArg));
3291
+ getHTMLSectionStatements(section).push(_marko_compiler.types.expressionStatement(isReasonDynamic(closureScopesReason) && !isSameReason(closureScopesReason, reason) ? getExprIfSerialized(closure.section, closureScopesReason, script) : script));
3292
+ }
3289
3293
  } else {
3290
- const closureScopesReason = getSerializeReason(closure.section, closure, getAccessorPrefix().ClosureScopes);
3291
3294
  const subscribeArg = isReasonDynamic(closureScopesReason) && !isSameReason(closureScopesReason, sectionSerializeReason) ? getExprIfSerialized(closure.section, closureScopesReason, identifier) : identifier;
3292
3295
  addWriteScopeBuilder(section, (expr) => callRuntime("_subscribe", subscribeArg, expr));
3293
3296
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.3.50",
3
+ "version": "6.3.51",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",
@@ -57,7 +57,7 @@
57
57
  "magic-string": "^0.30.21"
58
58
  },
59
59
  "devDependencies": {
60
- "@marko/runtime-tags": "npm:marko@6.3.50",
60
+ "@marko/runtime-tags": "npm:marko@6.3.51",
61
61
  "marko": "5.39.40"
62
62
  },
63
63
  "engines": {