diff --git a/Sources/OpenSwiftUICore/Layout/Dynamic/DynamicContainer.swift b/Sources/OpenSwiftUICore/Layout/Dynamic/DynamicContainer.swift index 216f0a3a5..03a9dc2a5 100644 --- a/Sources/OpenSwiftUICore/Layout/Dynamic/DynamicContainer.swift +++ b/Sources/OpenSwiftUICore/Layout/Dynamic/DynamicContainer.swift @@ -611,10 +611,10 @@ struct DynamicContainerInfo: StatefulRule, AsyncAttribute, ObservedAttr let zIndex = infoItem.zIndex hasDepth = hasDepth || (zIndex != 0) if zIndex != info.items[target].zIndex { - info.items[target].zIndex = zIndex + info.items[index].zIndex = zIndex changed = true } - if phase != info.items[target].phase { + if phase != info.items[index].phase { changed = true } }