Skip to content

Commit a291614

Browse files
committed
use outer singled node
1 parent 610cc44 commit a291614

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/enzyme/src/ReactWrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ class ReactWrapper {
749749
*/
750750
parents(selector) {
751751
return this.single('parents', (n) => {
752-
const allParents = this.wrap(this.single('parents', n => nodeParents(this, n)));
752+
const allParents = this.wrap(nodeParents(this, n));
753753
return selector ? allParents.filter(selector) : allParents;
754754
});
755755
}

packages/enzyme/src/ShallowWrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ class ShallowWrapper {
982982
*/
983983
parents(selector) {
984984
return this.single('parents', (n) => {
985-
const allParents = this.wrap(this.single('parents', n => nodeParents(this, n)));
985+
const allParents = this.wrap(nodeParents(this, n));
986986
return selector ? allParents.filter(selector) : allParents;
987987
});
988988
}

0 commit comments

Comments
 (0)