Skip to content

Commit b24c640

Browse files
committed
Fix desktop app crash without profile picture
1 parent 7ba244d commit b24c640

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vault-web/src/desktopVault/WebVaultClient.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ export class WebVaultClient {
6464
}
6565

6666
handleResponse(request: XMLHttpRequest, bytes: boolean) {
67+
if (request.status === 204) {
68+
return undefined;
69+
}
70+
6771
const { body } = this.requestEncryption.decryptResponse(
6872
request.responseText,
6973
);
@@ -72,10 +76,6 @@ export class WebVaultClient {
7276
throw new Error(`Call error: ${request.status}: ${body}`);
7377
}
7478

75-
if (request.status === 204) {
76-
return undefined;
77-
}
78-
7979
if (bytes) {
8080
return new Uint8Array(decode(body));
8181
}

0 commit comments

Comments
 (0)