File tree Expand file tree Collapse file tree 1 file changed +6
-22
lines changed
Expand file tree Collapse file tree 1 file changed +6
-22
lines changed Original file line number Diff line number Diff line change @@ -17,18 +17,10 @@ export function serialize(data: any, wrapPrimitives: boolean = false): any {
1717 }
1818 case 'number' : {
1919 const hasDecimals = numberHasDecimals ( data ) ;
20- if ( numberIs64Bit ( data ) ) {
21- if ( hasDecimals ) {
22- return NSNumber . alloc ( ) . initWithDouble ( data ) ;
23- } else {
24- return NSNumber . alloc ( ) . initWithLongLong ( data ) ;
25- }
20+ if ( hasDecimals ) {
21+ return NSNumber . alloc ( ) . initWithDouble ( data ) ;
2622 } else {
27- if ( hasDecimals ) {
28- return NSNumber . alloc ( ) . initWithFloat ( data ) ;
29- } else {
30- return data ;
31- }
23+ return NSNumber . alloc ( ) . initWithLongLong ( data ) ;
3224 }
3325 }
3426
@@ -79,18 +71,10 @@ export function serialize(data: any, wrapPrimitives: boolean = false): any {
7971 }
8072 case 'number' : {
8173 const hasDecimals = numberHasDecimals ( data ) ;
82- if ( numberIs64Bit ( data ) ) {
83- if ( hasDecimals ) {
84- return java . lang . Double . valueOf ( data ) ;
85- } else {
86- return java . lang . Long . valueOf ( data ) ;
87- }
74+ if ( hasDecimals ) {
75+ return java . lang . Double . valueOf ( data ) ;
8876 } else {
89- if ( hasDecimals ) {
90- return java . lang . Float . valueOf ( data ) ;
91- } else {
92- return java . lang . Integer . valueOf ( data ) ;
93- }
77+ return java . lang . Long . valueOf ( data ) ;
9478 }
9579 }
9680
You can’t perform that action at this time.
0 commit comments