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 {
17
17
}
18
18
case 'number' : {
19
19
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 ) ;
26
22
} else {
27
- if ( hasDecimals ) {
28
- return NSNumber . alloc ( ) . initWithFloat ( data ) ;
29
- } else {
30
- return data ;
31
- }
23
+ return NSNumber . alloc ( ) . initWithLongLong ( data ) ;
32
24
}
33
25
}
34
26
@@ -79,18 +71,10 @@ export function serialize(data: any, wrapPrimitives: boolean = false): any {
79
71
}
80
72
case 'number' : {
81
73
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 ) ;
88
76
} 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 ) ;
94
78
}
95
79
}
96
80
You can’t perform that action at this time.
0 commit comments