| ... | @@ -50,8 +50,8 @@ function EnabledPullRequestThreadLinks({ | ... | @@ -50,8 +50,8 @@ function EnabledPullRequestThreadLinks({ |
| 50 | onPickerOpenChange, | 50 | onPickerOpenChange, |
| 51 | }: PullRequestThreadLinksProps) { | 51 | }: PullRequestThreadLinksProps) { |
| 52 | const parsed = parseChangeRequestUrl(url); | 52 | const parsed = parseChangeRequestUrl(url); |
| 53 | const currentThreadRef = threadRef?.environmentId === environmentId ? threadRef : null; | 53 | const thread = useThreadShell(threadRef?.environmentId === environmentId ? threadRef : null); |
| 54 | const thread = useThreadShell(currentThreadRef); | 54 | const currentThreadRef = thread === null ? null : threadRef; |
| 55 | const linking = usePullRequestLinking(environmentId); | 55 | const linking = usePullRequestLinking(environmentId); |
| 56 | const linkedHere = linking.isLinked(thread, url); | 56 | const linkedHere = linking.isLinked(thread, url); |
| 57 | const relations = useEnvironmentQuery( | 57 | const relations = useEnvironmentQuery( |