fix: add gaurd to sanitise ws manager

This commit is contained in:
Jack Waller
2024-06-04 13:41:59 +10:00
parent 5bdde3e282
commit 18f8eb37b7

View File

@@ -37,10 +37,10 @@ const MAX_BUFFERED_AMOUNT = 300000;
const CHANNEL_PREFIX = RedisClientPrefix.DLOB;
const CHANNEL_PREFIX_HELIUS = RedisClientPrefix.DLOB_HELIUS;
const sanitiseChannelForClient = (channel: string): string => {
const sanitiseChannelForClient = (channel: string | undefined): string => {
return channel
.replace(CHANNEL_PREFIX, '')
.replace(CHANNEL_PREFIX_HELIUS, '');
?.replace(CHANNEL_PREFIX, '')
?.replace(CHANNEL_PREFIX_HELIUS, '');
};
const getRedisChannelFromMessage = (message: any): string => {