Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #24 from patnolanireland/feature/parsed-data-empty…

…-rows

Feature/parsed data empty rows
  • Loading branch information...
commit c0184a32a563f49a40a25a8e77d990bcec79b23a 2 parents 7a18747 + cf164c0
@ncb000gt authored
Showing with 8 additions and 1 deletion.
  1. +2 −0  README.md
  2. +4 −0 lib/ga.js
  3. +2 −1  package.json
View
2  README.md
@@ -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
============
@@ -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
View
4 lib/ga.js
@@ -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);
View
3  package.json
@@ -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": {
Please sign in to comment.
Something went wrong with that request. Please try again.