Merge pull request #651 from btelles/master

Fix for IE8 and jQuery 1.7.1 compatibility.
This commit is contained in:
Fabian Jakobs 2012-02-25 07:25:03 -08:00
commit 1178b03f37

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;
};
});
});