- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 21 Apr 2011 04:25:10 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec-author-view
In directory hutz:/tmp/cvs-serv14345
Modified Files:
toc.js
Log Message:
deal with "li" elem that don't have "a" element child
Index: toc.js
===================================================================
RCS file: /sources/public/html5/spec-author-view/toc.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- toc.js 17 Aug 2010 20:01:26 -0000 1.1
+++ toc.js 21 Apr 2011 04:25:08 -0000 1.2
@@ -2,7 +2,8 @@
var li = toc.firstChild;
var allmatched = true;
while (li) {
- if (li.nodeType == Node.ELEMENT_NODE) {
+ if (li.nodeType == Node.ELEMENT_NODE && li.hasChildNodes &&
+ li.firstChild.nodeType == Node.ELEMENT_NODE) {
var id = li.firstChild.hash.substr(1);
var target = document.getElementById(id);
var matched = false;
Received on Thursday, 21 April 2011 04:25:11 UTC