diff --git a/src/happyx/private/macro_utils.nim b/src/happyx/private/macro_utils.nim index ce15f29d..ef215c1c 100644 --- a/src/happyx/private/macro_utils.nim +++ b/src/happyx/private/macro_utils.nim @@ -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: diff --git a/src/happyx/spa/renderer.nim b/src/happyx/spa/renderer.nim index 7ea1c144..d4067bf4 100644 --- a/src/happyx/spa/renderer.nim +++ b/src/happyx/spa/renderer.nim @@ -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: @@ -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: