Skip to content

Commit 4508ad1

Browse files
committed
Fix error when submitter ip not found
1 parent dc51582 commit 4508ad1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/getBranding.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ async function shouldKeepSubmission(submissions: BrandingDBSubmission[], type: B
225225
if (cache.currentIP === null) cache.currentIP = getHashCache((ip + config.globalSalt) as IPAddress);
226226
const hashedIP = await cache.currentIP;
227227

228-
return submitterIP.hashedIP === hashedIP;
228+
return submitterIP?.hashedIP === hashedIP;
229229
} catch (e) {
230230
// give up on shadow hide for now
231231
Logger.error(`getBranding: Error while trying to find IP: ${e}`);

0 commit comments

Comments
 (0)