Page MenuHomePhabricator

D10665.id35727.diff
No OneTemporary

D10665.id35727.diff

diff --git a/lib/components/keyserver-connection-handler.js b/lib/components/keyserver-connection-handler.js
--- a/lib/components/keyserver-connection-handler.js
+++ b/lib/components/keyserver-connection-handler.js
@@ -1,5 +1,6 @@
// @flow
+import invariant from 'invariant';
import * as React from 'react';
import { logOutActionTypes, useLogOut } from '../actions/user-actions.js';
@@ -35,6 +36,8 @@
const identityClient = React.useContext(
IdentityClientContext,
)?.identityClient;
+ invariant(identityClient, 'Identity client should be set');
+
React.useEffect(() => {
if (!usingCommServicesAccessToken) {
return;
@@ -42,7 +45,7 @@
void (async () => {
try {
- await identityClient?.getKeyserverKeys(keyserverID);
+ await identityClient.getKeyserverKeys(keyserverID);
} catch (e) {
console.log(
`Error getting keys for keyserver with id ${keyserverID}`,

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 2, 5:09 PM (19 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2608264
Default Alt Text
D10665.id35727.diff (946 B)

Event Timeline