@cypress/unique-selector 2.1.2 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -304,7 +304,7 @@ function unique(el) {
|
|
|
304
304
|
// to prefix the selector with `:host >` to anchor against the root. This helps
|
|
305
305
|
// address the possibility of a unique path segment not existing before reaching
|
|
306
306
|
// the root.
|
|
307
|
-
if (!isUniqueSelector && (0, _isShadowRoot.isShadowRoot)(el.parentNode)) {
|
|
307
|
+
if (!isUniqueSelector && el.parentNode && (0, _isShadowRoot.isShadowRoot)(el.parentNode)) {
|
|
308
308
|
maybeUniqueSelector = ':host > ' + maybeUniqueSelector;
|
|
309
309
|
isUniqueSelector = (0, _isUnique.isUnique)(el, maybeUniqueSelector);
|
|
310
310
|
|
package/package.json
CHANGED