Skip to content

Commit

Permalink
spacebars: Allow partial optimisation within table's
Browse files Browse the repository at this point in the history
This prevents optimisation of <table> and <tr> elements,
but allows all children of those elements to be optimised.
  • Loading branch information
nathan-muir committed Mar 18, 2021
1 parent b0cffc6 commit 940c73e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/spacebars-compiler/optimizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ CanOptimizeVisitor.def({
// browser will insert a TBODY. If we just `createElement("table")` and
// `createElement("tr")`, on the other hand, no TBODY is necessary
// (assuming IE 8+).
return OPTIMIZABLE.NONE;
return OPTIMIZABLE.PARTS;
} else if (tagName === 'tr'){
return OPTIMIZABLE.PARTS;
}

var children = tag.children;
Expand Down

0 comments on commit 940c73e

Please sign in to comment.