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