Skip to content

Commit

Permalink
fix replaceChild parameter order (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahti authored Feb 4, 2023
1 parent f1cbfcf commit e0d8e9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/TokamakDOM/DOMFiberRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,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
Expand Down

0 comments on commit e0d8e9d

Please sign in to comment.