Skip to content

Commit

Permalink
Merge pull request #41 from nagits/master
Browse files Browse the repository at this point in the history
Enumerate only the own properties of an object
  • Loading branch information
muaz-khan authored Mar 28, 2017
2 parents 95cc4ce + fe7ac63 commit 7ee7e18
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dev/detectDesktopOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ function detectDesktopOS() {
r: /(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/
}];
for (var id in clientStrings) {
var cs = clientStrings[id];
if (cs.r.test(nAgt)) {
os = cs.s;
break;
if (clientStrings.hasOwnProperty(id)) {
var cs = clientStrings[id];
if (cs.r.test(nAgt)) {
os = cs.s;
break;
}
}
}

Expand Down

0 comments on commit 7ee7e18

Please sign in to comment.