Prevent terminal being created twice (#10200)
I missed this in code review.
This commit is contained in:
1 parent
301c045aad
commit
a67a5a8105
1 file changed
+2
-2
@@ -154,7 +154,7 @@ const TerminalPage: FC = () => {
|
||||
|
||||
// Create the terminal!
|
||||
useEffect(() => {
|
||||
if (!xtermRef.current) {
|
||||
if (!xtermRef.current || config.isLoading) {
|
||||
return;
|
||||
}
|
||||
const terminal = new XTerm.Terminal({
|
||||
@@ -210,7 +210,7 @@ const TerminalPage: FC = () => {
|
||||
window.removeEventListener("resize", listener);
|
||||
terminal.dispose();
|
||||
};
|
||||
}, [config.data, sendEvent, xtermRef, handleWebLink]);
|
||||
}, [config.data, config.isLoading, sendEvent, xtermRef, handleWebLink]);
|
||||
|
||||
// Triggers the initial terminal connection using
|
||||
// the reconnection token and workspace name found
|
||||
|
||||
Reference in new issue
Block a user