Skip to content

Commit

Permalink
Stop clearing buffer reference
Browse files Browse the repository at this point in the history
The buffer reference was being lost when clearing the array. This reference is helpful when rendering on the server with other libraries besides Metal (such as React).
  • Loading branch information
mairatma committed Oct 7, 2020
1 parent eabc067 commit c56cfe3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/incremental-dom-string/src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const patch = function(node, fn, data) {
currentParent = node;
fn(data);
currentParent.innerHTML = buffer.join('');
buffer = [];
buffer.splice(0, buffer.length);
return currentParent;
};

Expand Down

0 comments on commit c56cfe3

Please sign in to comment.