Skip to content

Commit

Permalink
fix: solve #373
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethosa committed Dec 20, 2024
1 parent 28dc3c8 commit 99d4662
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
6 changes: 1 addition & 5 deletions src/happyx/private/macro_utils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -732,11 +732,7 @@ proc buildHtmlProcedure*(root, body: NimNode, inComponent: bool = false,
elif statement[1].kind == nnkStmtList and statement[1][0].kind in nnkStrLit..nnkTripleStrLit:
node = statement[1][0]
else:
throwDefect(
HpxBuildHtmlDefect,
"rawHtml allows only static string! ",
lineInfoObj(statement[1])
)
node = statement[1]
result.add(newCall("tagFromString", node))

elif statement.kind == nnkCall and statement[0] == ident"lazy" and statement.len == 2 and statement[1].kind == nnkStmtList:
Expand Down
5 changes: 1 addition & 4 deletions src/happyx/spa/renderer.nim
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ when defined(js):
attrs[i.nodeName] = i.nodeValue
return attrs
proc patchAttrs(dom, vdom: Node) {.exportc: "patrs".} =
var
let
domAttrs = dom.attrIndex
vdomAttrs = vdom.attrIndex
if domAttrs == vdomAttrs:
Expand Down Expand Up @@ -344,9 +344,6 @@ when defined(js):
for i in rendererHandlers:
if i.key == "beforeRendered":
i.p()
# let tempTag = tag.cloneNode(true).TagRef
# tempTag.prerenderVdomProcs()
# tempTag.diff(realDom)
tag.prerenderLazyProcs()
tag.diff(realDom)
for i in rendererHandlers:
Expand Down

0 comments on commit 99d4662

Please sign in to comment.