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};
|
||||
}
|
||||
|
||||
if (typeof value === 'undefined') {
|
||||
return {type: 'undefined'};
|
||||
}
|
||||
|
||||
if (!value || typeof value != 'object') {
|
||||
return {value: value};
|
||||
}
|
||||
|
|
|
@ -315,6 +315,10 @@ JSValueRef RPCServer::deserialize_json_value(const json dict)
|
|||
}
|
||||
return date;
|
||||
}
|
||||
else if (type_string == "undefined") {
|
||||
return JSValueMakeUndefined(m_context);
|
||||
}
|
||||
assert(0);
|
||||
}
|
||||
|
||||
if (value.is_null()) {
|
||||
|
@ -353,5 +357,5 @@ JSValueRef RPCServer::deserialize_json_value(const json dict)
|
|||
return js_object;
|
||||
}
|
||||
|
||||
return JSValueMakeUndefined(m_context);
|
||||
assert(0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue