From 5f083a7d01c9f0f0e24ffdd0be8b976ee59b3de1 Mon Sep 17 00:00:00 2001 From: Araq Date: Sun, 16 Apr 2017 01:36:42 +0200 Subject: [PATCH] bugfix: virtual thunks need to have a key of -1 --- src/vdom.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vdom.nim b/src/vdom.nim index d138c7a..25f6c12 100644 --- a/src/vdom.nim +++ b/src/vdom.nim @@ -124,10 +124,10 @@ template callThunk*(fn: typed; n: VNode): untyped = fn(n.kids) proc vthunk*(name: cstring; args: varargs[VNode, vn]): VNode = - VNode(kind: VNodeKind.vthunk, text: name, kids: @args) + VNode(kind: VNodeKind.vthunk, text: name, key: -1, kids: @args) proc dthunk*(name: cstring; args: varargs[VNode, vn]): VNode = - VNode(kind: VNodeKind.dthunk, text: name, kids: @args) + VNode(kind: VNodeKind.dthunk, text: name, key: -1, kids: @args) proc eq*(a, b: VNode): bool = if a.kind != b.kind: return false