From 49471f35ea23e21abebaf7be9aefbc24cfe4747f Mon Sep 17 00:00:00 2001 From: Lukas Date: Sat, 1 Oct 2022 20:32:58 +0200 Subject: [PATCH] fix replaceChild parameter order --- Sources/TokamakDOM/DOMFiberRenderer.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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