Update viewer.tsx (#2106)

pull/2107/head^2
Omar López 2022-03-10 15:13:26 -07:00 committed by GitHub
parent ec97971e7d
commit d98731d50a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -634,7 +634,7 @@ const loggedInViewerRouter = createProtectedRouter()
if (username !== user.username) { if (username !== user.username) {
data.username = username; data.username = username;
const response = await checkUsername(username); const response = await checkUsername(username);
if (!response.available) { if (!response.available || response.premium) {
throw new TRPCError({ code: "BAD_REQUEST", message: response.message }); throw new TRPCError({ code: "BAD_REQUEST", message: response.message });
} }
} }