cherry picking @Yaco-Sistemas commit to fix IE 8

pull/231/merge
Peter 'Pita' Martischka 2011-11-28 11:18:47 -08:00
parent a2d3c6ddb2
commit e5d12f1d56
1 changed files with 5 additions and 2 deletions

View File

@ -76,10 +76,13 @@ function isArray(testObject)
if (typeof exports !== "undefined")
{
var navigator = {userAgent: "node-js"};
userAgent = "node-js";
}
else
{
userAgent = navigator.userAgent.toLowerCase();
}
// Figure out what browser is being used (stolen from jquery 1.2.1)
userAgent = navigator.userAgent.toLowerCase();
var browser = {
version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
safari: /webkit/.test(userAgent),