Skip to content

Commit

Permalink
* scope_handler - bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
uriel-online committed Jul 1, 2024
1 parent fbbfc04 commit fd9becf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5987,11 +5987,12 @@ xover.modernize = async function (targetWindow) {
scope = source.selectFirst(`//*[@xo:id="${scope.value}"]`);
//if (!slot && this instanceof Text) slot = 'text()';
if (scope && slot) {
slot = slot.value;
if (slot === 'text()') {
let textNode = [...scope.childNodes].filter(el => el instanceof Text).pop() || scope.createTextNode(null);
this.scopeNode = textNode;
return this.scopeNode || this.ownerDocument.createComment("ack:no-scope");
} else if (slot.value.indexOf('::') != -1) {
} else if (slot.indexOf('::') != -1) {
let node = scope.selectFirst(slot);
this.scopeNode = node;
return this.scopeNode || this.ownerDocument.createComment("ack:no-scope");
Expand Down

0 comments on commit fd9becf

Please sign in to comment.