mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 14:53:45 +02:00
Prevent memory leak when component updates and ref changes
This commit is contained in:
@@ -45,7 +45,7 @@ export default () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (ref.current) {
|
if (ref.current && !terminal.element) {
|
||||||
terminal.open(ref.current);
|
terminal.open(ref.current);
|
||||||
|
|
||||||
// @see https://github.com/xtermjs/xterm.js/issues/2265
|
// @see https://github.com/xtermjs/xterm.js/issues/2265
|
||||||
|
|||||||
Reference in New Issue
Block a user