Merge pull request #225 from jeresig/clone-buildhtml
buildHTML's buildExpression is destructive, changing the tree object.
This commit is contained in:
commit
c87b20aadd
|
@ -1157,6 +1157,10 @@ var buildGroup = function(group, options, prev) {
|
|||
* nodes.
|
||||
*/
|
||||
var buildHTML = function(tree, settings) {
|
||||
// buildExpression is destructive, so we need to make a clone
|
||||
// of the incoming tree so that it isn't accidentally changed
|
||||
tree = JSON.parse(JSON.stringify(tree));
|
||||
|
||||
var startStyle = Style.TEXT;
|
||||
if (settings.displayMode) {
|
||||
startStyle = Style.DISPLAY;
|
||||
|
|
Loading…
Reference in New Issue
Block a user