Skip to content

Commit

Permalink
Fix debugKaraxSame flag condition (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
planetis-m authored Apr 23, 2023
1 parent 5cf360c commit ccb0503
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions karax/karax.nim
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ proc dodraw(kxi: KaraxInstance) =
let asdom = toDom(newtree, useAttachedNode = true, kxi)
replaceById(kxi.rootId, asdom)
else:
when not defined(debugKaraxSame):
when defined(debugKaraxSame):
doAssert same(kxi.currentTree, document.getElementById(kxi.rootId))
let olddom = document.getElementById(kxi.rootId)
diff(newtree, kxi.currentTree, nil, olddom, kxi)
Expand All @@ -684,7 +684,7 @@ proc dodraw(kxi: KaraxInstance) =
echo ">>>>>>>>>>>>>>"
applyPatch(kxi)
kxi.currentTree = newtree
when not defined(debugKaraxSame):
when defined(debugKaraxSame):
doAssert same(kxi.currentTree, document.getElementById(kxi.rootId))

if not kxi.postRenderCallback.isNil:
Expand Down

0 comments on commit ccb0503

Please sign in to comment.