Skip to content

Commit

Permalink
UBER-478: Fix issue presenter concurrency (#3426)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
  • Loading branch information
haiodo authored Jun 12, 2023
1 parent 7c417e2 commit 8c28236
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@
const spaceQuery = createQuery()
let currentProject: Project | undefined = value?.$lookup?.space
$: if (value?.$lookup?.space === undefined && !projects?.has(value.space)) {
spaceQuery.query(tracker.class.Project, { _id: value.space }, (res) => ([currentProject] = res))
} else {
currentProject = value?.$lookup?.space ?? projects?.get(value.space)
spaceQuery.unsubscribe()
$: if (value !== undefined) {
if (value.$lookup?.space === undefined && !projects?.has(value.space)) {
spaceQuery.query(tracker.class.Project, { _id: value.space }, (res) => ([currentProject] = res))
} else {
currentProject = value?.$lookup?.space ?? projects?.get(value?.space)
spaceQuery.unsubscribe()
}
}
$: title = currentProject ? `${currentProject.identifier}-${value?.number}` : `${value?.number}`
Expand Down

0 comments on commit 8c28236

Please sign in to comment.