Fix error when submitter ip not found

This commit is contained in:
Ajay 2024-09-13 14:37:37 -04:00
parent dc5158257e
commit 4508ad11f2

View file

@ -225,7 +225,7 @@ async function shouldKeepSubmission(submissions: BrandingDBSubmission[], type: B
if (cache.currentIP === null) cache.currentIP = getHashCache((ip + config.globalSalt) as IPAddress);
const hashedIP = await cache.currentIP;
return submitterIP.hashedIP === hashedIP;
return submitterIP?.hashedIP === hashedIP;
} catch (e) {
// give up on shadow hide for now
Logger.error(`getBranding: Error while trying to find IP: ${e}`);