MCPcopy Create free account
hub / github.com/caseywebdev/react-list / findAncestor

Function findAncestor

docs/index.js:21137–21148  ·  view source on GitHub ↗
(parent, tagName)

Source from the content-addressed store, hash-verified

21135 return null;
21136 }
21137 function findAncestor(parent, tagName) {
21138 for (; parent; ) {
21139 switch (parent.tag) {
21140 case 5:
21141 case 26:
21142 case 27:
21143 if (parent.type === tagName) return parent;
21144 }
21145 parent = parent.return;
21146 }
21147 return null;
21148 }
21149 function validateDOMNesting(childTag, ancestorInfo) {
21150 ancestorInfo = ancestorInfo || emptyAncestorInfoDev;
21151 var parentInfo = ancestorInfo.current;

Callers 2

validateDOMNestingFunction · 0.85
validateTextNestingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…