mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 06:46:03 +00:00
don't convert undefined to null in rpc requests
This commit is contained in:
parent
18d65471be
commit
ec87281cc1
@ -90,6 +90,10 @@ function serialize(realmId, value) {
|
|||||||
return {type: objectTypes.FUNCTION};
|
return {type: objectTypes.FUNCTION};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof value === 'undefined') {
|
||||||
|
return {type: 'undefined'};
|
||||||
|
}
|
||||||
|
|
||||||
if (!value || typeof value != 'object') {
|
if (!value || typeof value != 'object') {
|
||||||
return {value: value};
|
return {value: value};
|
||||||
}
|
}
|
||||||
|
@ -315,6 +315,10 @@ JSValueRef RPCServer::deserialize_json_value(const json dict)
|
|||||||
}
|
}
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
else if (type_string == "undefined") {
|
||||||
|
return JSValueMakeUndefined(m_context);
|
||||||
|
}
|
||||||
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value.is_null()) {
|
if (value.is_null()) {
|
||||||
@ -353,5 +357,5 @@ JSValueRef RPCServer::deserialize_json_value(const json dict)
|
|||||||
return js_object;
|
return js_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
return JSValueMakeUndefined(m_context);
|
assert(0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user