Skip to content

Commit

Permalink
fix share code (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
younes200 authored Oct 24, 2023
1 parent 7e3b787 commit e7d47f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/trpc/src/routers/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,13 @@ export const projectRouter = router({

let shareCode = project.shareCode;

if (project.shared != input.shared) {
if (project.shared != input.shared && input.shared != null) {
if (input.shared) {
shareCode = generateUniqueShareName(project.title);

} else {
shareCode = null;
}

}
const updatedProject = await prisma.project.update({
where: {
Expand Down

0 comments on commit e7d47f2

Please sign in to comment.