Bug Tracker

Opened 10 years ago

Closed 8 years ago

#5200 closed bug (invalid)

1.2.6 or higher causes type error in Galio

Reported by: rhythmicdevil Owned by: rhythmicdevil
Priority: trivial Milestone: 1.3
Component: selector Version: 1.3.2
Keywords: Galio Cc:
Blocked by: Blocking:

Description

When simply loading a page in Galio I get a type error notification. I traced the error to Sizzle.find and the following comparison: if ( left.substr( left.length - 1 ) !== "
"

I wrapped this in a conditional checking for undefined and the error went away. The new function follows.

Sizzle.find = function(expr, context, isXML){

var set, match;

if ( !expr ) {

return [];

}

for ( var i = 0, l = Expr.order.length; i < l; i++ ) {

var type = Expr.order[i], match;

if ( (match = Expr.match[ type ].exec( expr )) ) {

var left = RegExp.leftContext; if(typeof(left) != 'undefined') {

if ( left.substr( left.length - 1 ) !== "
" ) {

match[1] = (match[1]
"").replace(/
/g, "");

set = Expr.find[ type ]( match, context, isXML );

if ( set != null ) {

expr = expr.replace( Expr.match[ type ], "" ); break;

}

}

}

}

}

if ( !set ) {

set = context.getElementsByTagName("*");

}

return {set: set, expr: expr};

};

Change History (4)

comment:1 Changed 10 years ago by flesler

Priority: blockertrivial

comment:2 Changed 9 years ago by dmethvin

Component: coreselector
Owner: set to john

comment:3 Changed 9 years ago by dmethvin

Owner: changed from john to rhythmicdevil
Status: newpending

Please provide a test case.

comment:4 Changed 8 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Automatically closed due to 14 days of inactivity.

Note: See TracTickets for help on using tickets.