Compare commits

...

1 commit

Author SHA1 Message Date
Alex Clemmer dd72f4c62c Don't attempt to deserialize empty invoke responses 2019-11-06 18:41:49 -08:00

View file

@ -335,7 +335,7 @@ function serializePropertiesSync(prop: any): any {
}
}
function deserializeResponse(tok: string, resp: any) {
function deserializeResponse(tok: string, resp: any): any {
const failures: any = resp.getFailuresList();
if (failures && failures.length) {
let reasons = "";
@ -350,5 +350,8 @@ function deserializeResponse(tok: string, resp: any) {
throw new Error(`Invoke of '${tok}' failed: ${reasons}`);
}
return deserializeProperties(resp.getReturn());
const ret = resp.getReturn();
return ret === undefined
? ret
: deserializeProperties(ret);
}