Skip to content

Commit

Permalink
fixed replacing text nodes bug
Browse files Browse the repository at this point in the history
  • Loading branch information
duelistone committed Feb 20, 2023
1 parent 635923e commit 9c4e0b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/IHP/static/vendor/ihp-ssc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit 9c4e0b1

Please sign in to comment.