mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-08 12:16:12 -05:00
Handle new account having a team in account merge Closes #2308
This commit is contained in:
@@ -2,8 +2,11 @@ export function errorIsSqliteUniqueConstraintFailure(error: any) {
|
||||
return error?.code === "SQLITE_CONSTRAINT_UNIQUE";
|
||||
}
|
||||
|
||||
export function errorIsSqliteForeignKeyConstraintFailure(error: Error) {
|
||||
return error?.message?.includes("FOREIGN KEY constraint failed");
|
||||
export function errorIsSqliteForeignKeyConstraintFailure(error: unknown) {
|
||||
return (
|
||||
error instanceof Error &&
|
||||
error?.message?.includes("FOREIGN KEY constraint failed")
|
||||
);
|
||||
}
|
||||
|
||||
export function parseDBJsonArray(value: any) {
|
||||
|
||||
Reference in New Issue
Block a user