Fix promise handling in ZenViewSplitter to prevent memory leaks

This commit is contained in:
mr. M
2025-03-07 16:26:30 +01:00
parent 8e789732f9
commit 00654c168f

View File

@@ -247,10 +247,13 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
}
),
]);
this._finishAllAnimatingPromise.then(() => {
this._canDrop = true;
draggedTab._visuallySelected = true;
});
if (this._finishAllAnimatingPromise) {
this._finishAllAnimatingPromise.then(() => {
this._canDrop = true;
draggedTab._visuallySelected = true;
this._finishAllAnimatingPromise = null;
});
}
}, 100);
}