diff --git a/web/selectors/tunnelbroker-selectors.js b/web/selectors/tunnelbroker-selectors.js index e39d3b0c1..0f7babc7d 100644 --- a/web/selectors/tunnelbroker-selectors.js +++ b/web/selectors/tunnelbroker-selectors.js @@ -1,30 +1,30 @@ // @flow import { createSelector } from 'reselect'; import type { ConnectionInitializationMessage } from 'lib/types/tunnelbroker/session-types.js'; import type { AppState } from '../redux/redux-setup.js'; export const createTunnelbrokerInitMessage: AppState => ?ConnectionInitializationMessage = createSelector( - state => state.cryptoStore?.primaryIdentityKeys.ed25519, + state => state.cryptoStore?.primaryIdentityKeys?.ed25519, state => state.commServicesAccessToken, state => state.currentUserInfo?.id, ( deviceID: ?string, accessToken: ?string, userID: ?string, ): ?ConnectionInitializationMessage => { if (!deviceID || !accessToken || !userID) { return null; } return ({ type: 'ConnectionInitializationMessage', deviceID, accessToken, userID, deviceType: 'web', }: ConnectionInitializationMessage); }, );