fix ie8 jquery 1.7.1 compatibility

This commit is contained in:
Bernie Telles 2012-02-23 20:52:03 -08:00
commit f05b5d9961

View file

@ -42,7 +42,7 @@ define(function(require, exports, module) {
RegExp.prototype.exec = function (str) {
var match = real.exec.apply(this, arguments),
name, r2;
if (match) {
if ( typeof(str) == 'string' && match) {
// Fix browsers whose `exec` methods don't consistently return `undefined` for
// nonparticipating capturing groups
if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) {
@ -107,4 +107,4 @@ define(function(require, exports, module) {
return -1;
};
});
});