diff algorithm bugfix: don't be too smart in key handling
This commit is contained in:
parent
22f458724f
commit
ed3d467f31
1 changed files with 4 additions and 4 deletions
|
|
@ -75,12 +75,12 @@ proc vnodeToDom(n: VNode): Node =
|
||||||
elif n.kind == VNodeKind.vthunk:
|
elif n.kind == VNodeKind.vthunk:
|
||||||
let x = callThunk(vcomponents[n.text], n)
|
let x = callThunk(vcomponents[n.text], n)
|
||||||
result = vnodeToDom(x)
|
result = vnodeToDom(x)
|
||||||
n.key = result.key
|
#n.key = result.key
|
||||||
attach n
|
attach n
|
||||||
return result
|
return result
|
||||||
elif n.kind == VNodeKind.dthunk:
|
elif n.kind == VNodeKind.dthunk:
|
||||||
result = callThunk(dcomponents[n.text], n)
|
result = callThunk(dcomponents[n.text], n)
|
||||||
n.key = result.key
|
#n.key = result.key
|
||||||
attach n
|
attach n
|
||||||
return result
|
return result
|
||||||
else:
|
else:
|
||||||
|
|
@ -95,8 +95,8 @@ proc vnodeToDom(n: VNode): Node =
|
||||||
result.id = n.id
|
result.id = n.id
|
||||||
if n.class != nil:
|
if n.class != nil:
|
||||||
result.class = n.class
|
result.class = n.class
|
||||||
if n.key >= 0:
|
#if n.key >= 0:
|
||||||
result.key = n.key
|
# result.key = n.key
|
||||||
for k, v in attrs(n):
|
for k, v in attrs(n):
|
||||||
if v != nil:
|
if v != nil:
|
||||||
result.setAttr(k, v)
|
result.setAttr(k, v)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue