Skip to content

Commit ebfe576

Browse files
committed
fix(web): choose persisted threads when linking draft PRs
1 parent 2d81e4c commit ebfe576

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/web/src/components/pullRequest/PullRequestThreadLinks.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ function EnabledPullRequestThreadLinks({
5050
onPickerOpenChange,
5151
}: PullRequestThreadLinksProps) {
5252
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;
5555
const linking = usePullRequestLinking(environmentId);
5656
const linkedHere = linking.isLinked(thread, url);
5757
const relations = useEnvironmentQuery(

0 commit comments

Comments
 (0)