Skip to content

Commit

Permalink
Always output no-update fragment on the server (#1498)
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Feb 10, 2020
1 parent 8ebcea2 commit aae3382
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/core-tags/components/preserve-tag.js
@@ -1,11 +1,5 @@
module.exports = function render(input, out) {
var shouldPreserve = Boolean(!("if" in input) || input["if"]);

if (!shouldPreserve) {
input.renderBody && input.renderBody(out);
return;
}

var ownerComponentDef = out.___assignedComponentDef;
var ownerComponent = ownerComponentDef.___component;
var key = out.___assignedKey;
Expand All @@ -15,7 +9,7 @@ module.exports = function render(input, out) {
if (input.renderBody) {
var globalContext = out.___components.___globalContext;
var parentPreserved = globalContext.___isPreserved;
globalContext.___isPreserved = true;
globalContext.___isPreserved = parentPreserved || shouldPreserve;
input.renderBody(out);
globalContext.___isPreserved = parentPreserved;
}
Expand Down

0 comments on commit aae3382

Please sign in to comment.