Permalink
Browse files

handle non-integer values to trackEvent (fixes NSInvalidArgumentExcep…

…tion on null values)
  • Loading branch information...
1 parent 18f244c commit 1be704b1ee0d585db8de2e91368c5360cbd2c86d @robdiciuccio robdiciuccio committed Nov 26, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 iOS/GoogleAnalytics/GoogleAnalyticsPlugin.js
@@ -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);
};

0 comments on commit 1be704b

Please sign in to comment.