fix bug in spruce.ts
This commit is contained in:
2
web/dist/spruce.ts
vendored
2
web/dist/spruce.ts
vendored
@@ -22,7 +22,7 @@ export function runapp<Model, Msg>(
|
|||||||
) {
|
) {
|
||||||
function replace(parent: Node, node: Node | undefined, child: Node) {
|
function replace(parent: Node, node: Node | undefined, child: Node) {
|
||||||
if (node) {
|
if (node) {
|
||||||
parent.insertBefore(node, child);
|
parent.insertBefore(child, node);
|
||||||
parent.removeChild(node);
|
parent.removeChild(node);
|
||||||
} else {
|
} else {
|
||||||
parent.appendChild(child);
|
parent.appendChild(child);
|
||||||
|
|||||||
Reference in New Issue
Block a user