diff --git a/Sources/TokamakDOM/DOMFiberRenderer.swift b/Sources/TokamakDOM/DOMFiberRenderer.swift index 5fff280be..59389cfb3 100644 --- a/Sources/TokamakDOM/DOMFiberRenderer.swift +++ b/Sources/TokamakDOM/DOMFiberRenderer.swift @@ -305,7 +305,7 @@ public struct DOMFiberRenderer: FiberRenderer { fatalError("The previous element does not exist (trying to replace element).") } let replacementElement = createElement(replacement) - _ = parentElement.replaceChild?(previousElement, replacementElement) + _ = parentElement.replaceChild?(replacementElement, previousElement) case let .update(previous, newContent, geometry): previous.update(with: newContent) guard let previousElement = previous.reference