Skip to content

Commit

Permalink
fix: handle empty link
Browse files Browse the repository at this point in the history
  • Loading branch information
sajald77 committed Feb 15, 2023
1 parent cd073d1 commit 5d6a768
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/hooks/graphqlState/useProjectState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ export const useProjectState = (
return
}

if (key === 'links') {
input.links = project.links.filter((link) => link)
return
}

input[key as keyof UpdateProjectInput] = project[key]
})
input.projectId = toInt(project.id)
Expand Down

0 comments on commit 5d6a768

Please sign in to comment.