File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -69,10 +69,7 @@ export default class IPOSMessaging {
6969 this . process . send ( {
7070 protocol : 'ipos' ,
7171 type,
72- ...( Object . fromEntries (
73- Object . entries ( data ?? { } )
74- . map ( ( [ key , value ] ) => [ key , serialize ( value ) ] )
75- ) )
72+ ...serialize ( data )
7673 } )
7774 }
7875
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export function serialize(value: any): any | void {
99 }
1010 } else if ( Array . isArray ( value ) ) {
1111 return value . map ( v => serialize ( v ) )
12- } else if ( value . constructor === { } . constructor ) {
12+ } else if ( value . constructor === { } . constructor || value . valueOf ( ) . constructor === { } . constructor ) {
1313 return Object . fromEntries (
1414 Array . from ( Object . entries ( value ) )
1515 . map ( ( [ key , value ] ) => [ key , serialize ( value ) ] )
You can’t perform that action at this time.
0 commit comments