diff --git a/lib/IHP/static/vendor/ihp-ssc.js b/lib/IHP/static/vendor/ihp-ssc.js index f73a30c6e..0b8215ec4 100644 --- a/lib/IHP/static/vendor/ihp-ssc.js +++ b/lib/IHP/static/vendor/ihp-ssc.js @@ -104,10 +104,10 @@ function deleteNode(component, nodeOperation) { function replaceNode(component, nodeOperation) { nodeOperation.domNode.outerHTML = nodeOperation.newNodeHtml; if (debugMode) console.log('A#######', nodeOperation.domNode); - for (var component of nodeOperation.domNode.querySelectorAll('.ihp-ssc')) { - - - initalizeSSC(component); + if (nodeOperation.domNode.type == Node.ELEMENT_NODE) { + for (var component of nodeOperation.domNode.querySelectorAll('.ihp-ssc')) { + initalizeSSC(component); + } } }