Skip to content

Commit de3f940

Browse files
committed
Fixed a concurrently array modification error while rearranging the dock hierarchy during an undock
1 parent 72de00d commit de3f940

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/dock/dock_layout_engine.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ class DockLayoutEngine {
4747
// If the child count falls below the minimum threshold, destroy the parent and merge
4848
// the children with their grandparents
4949
DockNode grandParent = parentNode.parent;
50-
// parentNode.children.forEach((otherChild) {
51-
for (var otherChild in parentNode.children) {
50+
for (var i = 0; i < parentNode.children.length; i++) {
51+
final otherChild = parentNode.children[i];
5252
if (grandParent != null) {
5353
// parent node is not a root node
5454
grandParent.addChildAfter(parentNode, otherChild);

0 commit comments

Comments
 (0)