Bug Tracker

Ticket #3763: fix-attr.patch

File fix-attr.patch, 445 bytes (added by amikitik, 13 years ago)
  • jquery-1.2.6.

    old new  
    10371037
    10381038        attr: function( elem, name, value ) {
    10391039                // don't set attributes on text and comment nodes
    1040                 if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
     1040                if (!elem || elem.nodeType == 3 || elem.nodeType == 8 || elem.nodeType == undefined)
    10411041                        return undefined;
    10421042
    10431043                var notxml = !jQuery.isXMLDoc( elem ),