Bug 50474: Remove children of references node

Make sure we don't keep old references content around on re-render.

Change-Id: I79ad1e5d69ebb506078fa5903d1ff78b6ff82433
This commit is contained in:
Gabriel Wicke 2013-07-01 14:17:07 -07:00
parent cafe2f8799
commit a9ac140990

View file

@ -448,6 +448,11 @@ References.prototype.insertReferencesIntoDOM = function(refsNode) {
refsNode.setAttribute('data-mw', dataMW);
// Remove all children from the references node
while (refsNode.firstChild) {
refsNode.removeChild(refsNode.firstChild);
}
if (refGroup) {
refGroup.refs.map(refGroup.renderLine.bind(refGroup, refsNode));
}