We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f9117f commit e13d6d4Copy full SHA for e13d6d4
api-gateway/src/helpers/interceptors/utils/hash.ts
@@ -4,5 +4,5 @@ import crypto from 'crypto';
4
import {IAuthUser} from '@guardian/common';
5
6
export function getHash(user: IAuthUser | null): string {
7
- return crypto.createHash('md5').update(JSON.stringify(user.id ?? 'anonymous')).digest('hex');
+ return crypto.createHash('md5').update(JSON.stringify(user?.id ?? 'anonymous')).digest('hex');
8
}
0 commit comments