diff --git a/src/ua-parser.js b/src/ua-parser.js index 19b4780..702bf7e 100755 --- a/src/ua-parser.js +++ b/src/ua-parser.js @@ -964,14 +964,7 @@ } return this; } - UAParserItem.prototype.get = function (prop) { - if (!prop) return this.data; - return this.data.hasOwnProperty(prop) ? this.data[prop] : undefined; - }; - UAParserItem.prototype.parseUA = function () { - if (this.itemType != UA_RESULT) { - rgxMapper.call(this.data, this.ua, this.rgxMap); - } + UAParserItem.prototype.detectFeature = function () { var isSelfNav = NAVIGATOR && NAVIGATOR.userAgent == this.ua; switch(this.itemType) { case UA_BROWSER: @@ -998,6 +991,17 @@ } return this; }; + UAParserItem.prototype.get = function (prop) { + if (!prop) return this.data; + return this.data.hasOwnProperty(prop) ? this.data[prop] : undefined; + }; + UAParserItem.prototype.parseUA = function () { + if (this.itemType != UA_RESULT) { + rgxMapper.call(this.data, this.ua, this.rgxMap); + } + this.detectFeature(); + return this; + }; UAParserItem.prototype.parseCH = function () { var ua = this.ua, uaCH = this.uaCH,