Prevent memory leak when component updates and ref changes
This commit is contained in:
parent
75cd49a1c2
commit
12992e3521
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ export default () => {
|
|||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (ref.current) {
|
||||
if (ref.current && !terminal.element) {
|
||||
terminal.open(ref.current);
|
||||
|
||||
// @see https://github.com/xtermjs/xterm.js/issues/2265
|
||||
|
|
Loading…
Reference in a new issue