Skip to content

Commit

Permalink
Merge pull request #24 from patnolanireland/feature/parsed-data-empty…
Browse files Browse the repository at this point in the history
…-rows

Feature/parsed data empty rows
  • Loading branch information
ncb000gt committed Apr 10, 2013
2 parents 7a18747 + cf164c0 commit c0184a3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -95,6 +95,7 @@ Contributors
* [Brian Zeligson][beezee] - Updates for a more recent version of node. Also makes use of better selectors.
* [Mike Schierberl][mschierberl]
* [Gal Ben-Haim][bsphere] - Bug fixes for access token flow.
* [Patrick Nolan][patnolan] - Bug fixes for parsed_data not containing a rows field.

License
============
Expand All @@ -105,5 +106,6 @@ see license file
[beezee]:https://github.com/beezee
[mschierberl]:https://github.com/mschierberl
[bsphere]:https://github.com/bsphere
[patnolan]:https://github.com/patnolanireland

[gapi]:https://github.com/bsphere/node-gapitoken
4 changes: 4 additions & 0 deletions lib/ga.js
Expand Up @@ -139,6 +139,10 @@ GA.prototype.get = function(options, cb) {
}
}

if (!parsed_data.rows) {
parsed_data.rows = [];
}

for (var col=0; col<parsed_data.columnHeaders.length; col++){
if(parsed_data.columnHeaders[col]['columnType'] === "METRIC"){
metric_indexes.push(col);
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -7,7 +7,8 @@
"contributors": [
{ "name": "Brian Zeligson (http://github.com/beezee)", "email": "brian.zeligson@gmail.com" },
{ "name": "Mike Schierberl (http://github.com/mschierberl)", "email": "mike@schierberl.com" },
{ "name": "Gal Ben-Haim (http://github.com/bsphere", "email": "gbenhaim@gmail.com"}
{ "name": "Gal Ben-Haim (http://github.com/bsphere", "email": "gbenhaim@gmail.com"},
{ "name": "Patrick Nolan (http://github.com/patnolanireland", "email": "patnolanireland@gmail.com"}
],
"engines": { "node": ">= 0.4.0" },
"repository": {
Expand Down

0 comments on commit c0184a3

Please sign in to comment.