This commit is contained in:
hailin 2025-05-20 23:17:43 +08:00
parent 4b9f4489ca
commit 0323ee7336
1 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ export default async function Login({
if (!homeWorkspace || homeWorkspace.length === 0) {
// Handle the case where no rows are found
throw new Error(homeWorkspaceError?.message || "No home workspace found for this user.");
throw new Error((homeWorkspaceError as Error)?.message || "No home workspace found for this user.");
}
// If more than 1 row is returned, we handle that case
@ -121,7 +121,7 @@ export default async function Login({
const workspace = homeWorkspace[0]; // Use the first (and only) row
if (!homeWorkspace || homeWorkspace.length === 0) {
throw new Error(homeWorkspaceError?.message || "No home workspace found for this user.");
throw new Error((homeWorkspaceError as Error)?.message || "No home workspace found for this user.");
}
// if (!homeWorkspace) {