W3C home > Mailing lists > Public > public-html-diffs@w3.org > April 2010

hixie: Script error that was blocking sorting by Notes field (missing nullcheck)

From: poot <cvsmail@w3.org>
Date: Sun, 25 Apr 2010 18:01:55 +0900 (JST)
To: public-html-diffs@w3.org
Message-Id: <20100425090155.702A02BC4D@toro.w3.mag.keio.ac.jp>
hixie: Script error that was blocking sorting by Notes field (missing
nullcheck)

http://dev.w3.org/cvsweb/html5/status/issue-status.html?r1=1.158&r2=1.159&f=h

===================================================================
RCS file: /sources/public/html5/status/issue-status.html,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- issue-status.html	22 Apr 2010 04:12:39 -0000	1.158
+++ issue-status.html	25 Apr 2010 09:01:34 -0000	1.159
@@ -705,14 +705,14 @@
        trs[j].parentNode.removeChild(trs[j]);
      }
      cells.sort(function cmp(a, b) {
-       if (a.firstChild.nodeName == 'TIME')
+       if (a.hasChildNodes() && (a.firstChild.nodeName == 'TIME'))
           a_t1 = a.firstChild.getAttribute('datetime');
        else if (a.hasAttribute('id'))
           a_t1 = a.getAttribute('id');
        else
           a_t1 = a.textContent;
        a_t2 = a.parentNode.cells[0].getAttribute('id');
-       if (b.firstChild.nodeName == 'TIME')
+       if (b.hasChildNodes() && (b.firstChild.nodeName == 'TIME'))
           b_t1 = b.firstChild.getAttribute('datetime');
        else if (b.hasAttribute('id'))
           b_t1 = b.getAttribute('id');
Received on Sunday, 25 April 2010 09:02:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 06:14:19 GMT