(childText, parentTag)
| 21193 | return !1; |
| 21194 | } |
| 21195 | function validateTextNesting(childText, parentTag) { |
| 21196 | if (isTagValidWithParent("#text", parentTag)) return !0; |
| 21197 | var warnKey = "#text|" + parentTag; |
| 21198 | if (didWarn[warnKey]) return !1; |
| 21199 | didWarn[warnKey] = !0; |
| 21200 | var ancestor = (warnKey = current) |
| 21201 | ? findAncestor(warnKey, parentTag) |
| 21202 | : null; |
| 21203 | warnKey = |
| 21204 | null !== warnKey && null !== ancestor |
| 21205 | ? describeAncestors( |
| 21206 | ancestor, |
| 21207 | warnKey, |
| 21208 | 6 !== warnKey.tag ? { children: null } : null |
| 21209 | ) |
| 21210 | : ""; |
| 21211 | /\S/.test(childText) |
| 21212 | ? console.error( |
| 21213 | "In HTML, text nodes cannot be a child of <%s>.\nThis will cause a hydration error.%s", |
| 21214 | parentTag, |
| 21215 | warnKey |
| 21216 | ) |
| 21217 | : console.error( |
| 21218 | "In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.\nThis will cause a hydration error.%s", |
| 21219 | parentTag, |
| 21220 | warnKey |
| 21221 | ); |
| 21222 | return !1; |
| 21223 | } |
| 21224 | function setTextContent(node, text) { |
| 21225 | if (text) { |
| 21226 | var firstChild = node.firstChild; |
no test coverage detected
searching dependent graphs…