@@ -154,7 +154,7 @@ Countly.sendEvent = function (options) {
154154 // previous implementation was not clear about the data types of eventCount and eventSum
155155 // here parse them to make sure they are in correct format for the new method
156156 // parser will return a false value (NaN) in case of invalid data (like undefined, null, empty string, etc.)
157- options . eventCount = parseInt ( options . eventCount ) || 1 ;
157+ options . eventCount = parseInt ( options . eventCount , 10 ) || 1 ;
158158 options . eventSum = parseFloat ( options . eventSum ) || 0 ;
159159
160160 Countly . events . recordEvent ( options . eventName , options . segments , options . eventCount , options . eventSum ) ;
@@ -778,7 +778,7 @@ Countly.endEvent = function (options) {
778778 // previous implementation was not clear about the data types of eventCount and eventSum
779779 // here parse them to make sure they are in correct format for the new method
780780 // parser will return a false value (NaN) in case of invalid data (like undefined, null, empty string, etc.)
781- options . eventCount = parseInt ( options . eventCount ) || 1 ;
781+ options . eventCount = parseInt ( options . eventCount , 10 ) || 1 ;
782782 options . eventSum = parseFloat ( options . eventSum ) || 0 ;
783783 Countly . events . endEvent ( options . eventName , options . segments , options . eventCount , options . eventSum ) ;
784784} ;
@@ -907,7 +907,7 @@ Countly.userData.incrementBy = async function (keyName, keyValue) {
907907 if ( message ) {
908908 return message ;
909909 }
910- const intValue = parseInt ( keyValue ) . toString ( ) ;
910+ const intValue = parseInt ( keyValue , 10 ) . toString ( ) ;
911911 await CountlyReactNative . userData_incrementBy ( [ keyName , intValue ] ) ;
912912} ;
913913
@@ -934,7 +934,7 @@ Countly.userData.multiply = async function (keyName, keyValue) {
934934 if ( message ) {
935935 return message ;
936936 }
937- const intValue = parseInt ( keyValue ) . toString ( ) ;
937+ const intValue = parseInt ( keyValue , 10 ) . toString ( ) ;
938938 await CountlyReactNative . userData_multiply ( [ keyName , intValue ] ) ;
939939} ;
940940
@@ -961,7 +961,7 @@ Countly.userData.saveMax = async function (keyName, keyValue) {
961961 if ( message ) {
962962 return message ;
963963 }
964- const intValue = parseInt ( keyValue ) . toString ( ) ;
964+ const intValue = parseInt ( keyValue , 10 ) . toString ( ) ;
965965 await CountlyReactNative . userData_saveMax ( [ keyName , intValue ] ) ;
966966} ;
967967
@@ -988,7 +988,7 @@ Countly.userData.saveMin = async function (keyName, keyValue) {
988988 if ( message ) {
989989 return message ;
990990 }
991- const intValue = parseInt ( keyValue ) . toString ( ) ;
991+ const intValue = parseInt ( keyValue , 10 ) . toString ( ) ;
992992 await CountlyReactNative . userData_saveMin ( [ keyName , intValue ] ) ;
993993} ;
994994
@@ -1251,7 +1251,7 @@ Countly.userDataBulk.incrementBy = async function (keyName, keyValue) {
12511251 if ( message ) {
12521252 return message ;
12531253 }
1254- const intValue = parseInt ( keyValue ) . toString ( ) ;
1254+ const intValue = parseInt ( keyValue , 10 ) . toString ( ) ;
12551255 await CountlyReactNative . userDataBulk_incrementBy ( [ keyName , intValue ] ) ;
12561256} ;
12571257
@@ -1279,7 +1279,7 @@ Countly.userDataBulk.multiply = async function (keyName, keyValue) {
12791279 if ( message ) {
12801280 return message ;
12811281 }
1282- const intValue = parseInt ( keyValue ) . toString ( ) ;
1282+ const intValue = parseInt ( keyValue , 10 ) . toString ( ) ;
12831283 await CountlyReactNative . userDataBulk_multiply ( [ keyName , intValue ] ) ;
12841284} ;
12851285
@@ -1307,7 +1307,7 @@ Countly.userDataBulk.saveMax = async function (keyName, keyValue) {
13071307 if ( message ) {
13081308 return message ;
13091309 }
1310- const intValue = parseInt ( keyValue ) . toString ( ) ;
1310+ const intValue = parseInt ( keyValue , 10 ) . toString ( ) ;
13111311 await CountlyReactNative . userDataBulk_saveMax ( [ keyName , intValue ] ) ;
13121312} ;
13131313
@@ -1335,7 +1335,7 @@ Countly.userDataBulk.saveMin = async function (keyName, keyValue) {
13351335 if ( message ) {
13361336 return message ;
13371337 }
1338- const intValue = parseInt ( keyValue ) . toString ( ) ;
1338+ const intValue = parseInt ( keyValue , 10 ) . toString ( ) ;
13391339 await CountlyReactNative . userDataBulk_saveMin ( [ keyName , intValue ] ) ;
13401340} ;
13411341
0 commit comments