Skip to content

Commit

Permalink
compare localName with correct case for HTML5
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjbarton committed Mar 7, 2012
1 parent d3286d1 commit c3be48e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/domplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1448,8 +1448,8 @@ var Renderer =
table.innerHTML = html;

var tbody = table.firstChild;
var parent = before.localName == "TR" ? before.parentNode : before;
var after = before.localName == "TR" ? before.nextSibling : null;
var parent = before.localName.toLowerCase() == "tr" ? before.parentNode : before;
var after = before.localName.toLowerCase() == "tr" ? before.nextSibling : null;

var firstRow = tbody.firstChild, lastRow;
while (tbody.firstChild)
Expand All @@ -1462,7 +1462,7 @@ var Renderer =
}

var offset = 0;
if (before.localName == "TR")
if (before.localName.toLowerCase() == "tr")
{
var node = firstRow.parentNode.firstChild;
for (; node && node != firstRow; node = node.nextSibling)
Expand Down

0 comments on commit c3be48e

Please sign in to comment.