Skip to content

Commit

Permalink
Fix handling of ChromeOS
Browse files Browse the repository at this point in the history
  • Loading branch information
goldfire committed May 18, 2018
1 parent 5d862c9 commit bfd899e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "gameanalytics-node-sdk",
"description": "Unofficial GameAnalytics Node.js SDK using the REST API.",
"homepage": "https://github.com/goldfire/gameanalytics-node-sdk",
"version": "1.0.7",
"version": "1.0.8",
"keywords": [
"GameAnalytics",
"game analytics",
Expand Down
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class GameAnalytics {
data.platform = 'windows';
} else if (uaData.os.name === 'iOS') {
data.platform = 'ios';
} else if (uaData.os.name === 'Android') {
} else if (uaData.os.name === 'Android' || data.ua.includes('CrOS')) {
data.platform = 'android';
} else if (uaData.os.name === 'BlackBerry') {
data.platform = 'blackberry';
Expand All @@ -77,6 +77,8 @@ class GameAnalytics {
data.platform = 'tizen';
} else if (data.ua.includes('Linux')) {
data.platform = 'linux';
} else {
data.platform = 'unknown';
}
}

Expand Down

0 comments on commit bfd899e

Please sign in to comment.