Skip to content

Commit

Permalink
Merge pull request #7 from mmv/master
Browse files Browse the repository at this point in the history
Protect against libraries that extend Array.prototype
  • Loading branch information
cemerick committed Nov 1, 2013
2 parents 7e6da09 + 76123ec commit c95b291
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions diffview.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ diffview = {
node2.setAttribute("href", "http://github.com/cemerick/jsdifflib");

tdata.push(node = document.createElement("tbody"));
for (var idx in rows) node.appendChild(rows[idx]);
for (var idx in rows) rows.hasOwnProperty(idx) && node.appendChild(rows[idx]);

node = celt("table", "diff" + (inline ? " inlinediff" : ""));
for (var idx in tdata) node.appendChild(tdata[idx]);
for (var idx in tdata) tdata.hasOwnProperty(idx) && node.appendChild(tdata[idx]);
return node;
}
}
}

0 comments on commit c95b291

Please sign in to comment.