fix: avoid double-destroy in clearItems()

Each ClipboardItem widget is a direct child of _itemList.
destroy_all_children() already destroys all of them. Calling
widget.destroy() on each one beforehand triggered destruction twice on
the same actor, causing spurious warnings. Drop the forEach loop and
rely solely on destroy_all_children().

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Eduard Tolosa 2026-05-25 03:43:09 -05:00
parent 87e7e9f774
commit 64d5bbfdc3

View file

@ -303,7 +303,6 @@ export class StrataPanel {
this._items = []; this._items = [];
this._hoveredWidget = null; this._hoveredWidget = null;
this._activeWidget = null; this._activeWidget = null;
this._widgets.forEach(w => w.destroy());
this._widgets.clear(); this._widgets.clear();
this._itemList.destroy_all_children(); this._itemList.destroy_all_children();
} }