Skip to content

Commit cbd4692

Browse files
committed
fix(web): wait for server threads before preview port lookup
1 parent ae72746 commit cbd4692

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎apps/web/src/components/ChatView.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,11 @@ export default function ChatView(props: ChatViewProps) {
10641064
.filter(projectScriptReservesPort)
10651065
.map((script) => script.id);
10661066
const scriptPorts = useEnvironmentQuery(
1067-
canOperateTerminal && activeThreadRef && activeProject && previewScriptIds.length > 0
1067+
isServerThread &&
1068+
canOperateTerminal &&
1069+
activeThreadRef &&
1070+
activeProject &&
1071+
previewScriptIds.length > 0
10681072
? projectEnvironment.scriptPorts({
10691073
environmentId: activeThreadRef.environmentId,
10701074
input: {

0 commit comments

Comments
 (0)