Skip to content

Commit

Permalink
handle non-integer values to trackEvent (fixes NSInvalidArgumentExcep…
Browse files Browse the repository at this point in the history
…tion on null values)
  • Loading branch information
robdiciuccio committed Nov 26, 2012
1 parent 18f244c commit 1be704b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iOS/GoogleAnalytics/GoogleAnalyticsPlugin.js
Expand Up @@ -12,7 +12,7 @@ GoogleAnalyticsPlugin.prototype.trackEvent = function(category,action,label,valu
var options = {category:category,
action:action,
label:label,
value:value};
value:isNaN(parseInt(value)) ? -1 : value};
cordova.exec("GoogleAnalyticsPlugin.trackEvent",options);
};

Expand Down

0 comments on commit 1be704b

Please sign in to comment.