Fix linting error, remove unnecessary conditional

pull/2174/head
warrickct 4 years ago
parent 380d55066a
commit 096e1d24df

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

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

Loading…
Cancel
Save