From 4508ad11f22ff71e618594495c6e394ab92337c3 Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 13 Sep 2024 14:37:37 -0400 Subject: [PATCH] Fix error when submitter ip not found --- src/routes/getBranding.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/getBranding.ts b/src/routes/getBranding.ts index eb23b34..875e919 100644 --- a/src/routes/getBranding.ts +++ b/src/routes/getBranding.ts @@ -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}`);