This commit is contained in:
Faisal Salman 2012-10-22 16:04:23 +07:00
parent 59270c8cf7
commit 7ea79afc2f
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
{
"title": "UA-Parser.JS",
"name": "ua-parser-js",
"version": "0.4.3",
"version": "0.4.4",
"author": "Faisal Salman <fyzlman@gmail.com> (http://faisalman.com)",
"description": "Lightweight JavaScript-based user-agent string parser",
"keywords": [

View File

@ -1,4 +1,4 @@
// UA-Parser.JS v0.4.3
// UA-Parser.JS v0.4.4
// Lightweight JavaScript-based User-Agent string parser
// https://github.com/faisalman/ua-parser-js
//
@ -45,7 +45,7 @@
if (typeof props[k] === 'object' && props[k].length === 2) {
result[props[k][0]] = props[k][1];
} else if (typeof props[k] === 'object' && props[k].length === 3) {
if (typeof props[k][1] === 'function') {
if (typeof props[k][1] === 'function' && !(props[k][1].exec && props[k][1].test)) {
result[props[k][0]] = m ? props[k][1].call(this, m, props[k][2]) : undefined;
} else {
result[props[k][0]] = m ? m.replace(props[k][1], props[k][2]) : undefined;