diff --git a/src/resolvers/user.resolver.ts b/src/resolvers/user.resolver.ts index f48f9f3c..02de04b1 100644 --- a/src/resolvers/user.resolver.ts +++ b/src/resolvers/user.resolver.ts @@ -77,7 +77,7 @@ const userResolver: Resolvers = { }, class: ({ firstName, class: className }) => { // hide phøsets class - if (firstName.toLowerCase().match(/ph[øö]s$/)) { + if (/ph[øö]s$/.test(firstName.toLowerCase().split(' ')[0])) { return 'XXXX'; }