Fix linting error, remove unnecessary conditional

This commit is contained in:
warrickct 2022-03-07 10:06:41 +11:00
parent 380d55066a
commit 096e1d24df
2 changed files with 1 additions and 8 deletions

View file

@ -231,8 +231,6 @@ window.getOpenGroupBlockList = () => {
return window.groupBlockList;
};
window.openGroupBlockList = window?.getOpenGroupBlockList();
const { locale: localFromEnv } = config;
window.i18n = i18n.setup(localFromEnv, localeMessages);

View file

@ -51,12 +51,7 @@ export function parseOpenGroupV2(urlWithPubkey: string): OpenGroupV2Room | undef
* @returns true - group is in the blocklist, false - the group is not in the blocklist
*/
export const isGroupInBlockList = async (serverPubKey: string): Promise<boolean> => {
if (!window?.openGroupBlockList) {
// should already be there since this is called in preload
window.getOpenGroupBlockList();
}
const blockList = window?.openGroupBlockList;
const blockList = window?.getOpenGroupBlockList();
if (!blockList || !blockList.length) {
return false;
}