@asamuzakjp/dom-selector
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -43,3 +43,3 @@ { | ||
}, | ||
"version": "0.6.1" | ||
"version": "0.6.2" | ||
} |
@@ -1340,11 +1340,9 @@ /** | ||
const arr = this._match(this.#ast, this.#node); | ||
let res; | ||
if (arr.length) { | ||
const [i, j] = arr; | ||
if (i !== this.#node && i.nodeType === ELEMENT_NODE) { | ||
res = i; | ||
} else if (j) { | ||
res = j; | ||
const i = arr.findIndex(node => node === this.#node); | ||
if (i >= 0) { | ||
arr.splice(i, 1); | ||
} | ||
} | ||
const [res] = arr; | ||
return res || null; | ||
@@ -1351,0 +1349,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51923
1528