From b21c5b9611f62aa6c2ed996c959407a2297b5d04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Fri, 13 Mar 2020 19:37:09 +0100
Subject: [PATCH 19/37] docking: Cleanup the docks destruction code
---
docking.js | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/docking.js b/docking.js
index 5e3c47f..f1a7933 100644
--- a/docking.js
+++ b/docking.js
@@ -1772,11 +1772,8 @@ var DockManager = class DashToDock_DockManager {
this._keyboardShortcuts.destroy();
// Delete all docks
- let nDocks = this._allDocks.length;
- for (let i = nDocks-1; i >= 0; i--) {
- this._allDocks[i].destroy();
- this._allDocks.pop();
- }
+ this._allDocks.forEach(d => d.destroy());
+ this._allDocks = [];
}
_restoreDash() {
--
2.26.0