Skip to content

Commit f76d4dd

Browse files
committed
Merge pull request facebook#1770 from eins78/master
Also list <form> in error message as possible culprit
2 parents efdc5da + bcea3be commit f76d4dd

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

src/browser/ui/ReactMount.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,9 +649,10 @@ var ReactMount = {
649649
false,
650650
'findComponentRoot(..., %s): Unable to find element. This probably ' +
651651
'means the DOM was unexpectedly mutated (e.g., by the browser), ' +
652-
'usually due to forgetting a <tbody> when using tables, nesting <p> ' +
653-
'or <a> tags, or using non-SVG elements in an <svg> parent. Try ' +
654-
'inspecting the child nodes of the element with React ID `%s`.',
652+
'usually due to forgetting a <tbody> when using tables, nesting tags ' +
653+
'like <form>, <p>, or <a>, or using non-SVG elements in an <svg> ' +
654+
'parent. ' +
655+
'Try inspecting the child nodes of the element with React ID `%s`.',
655656
targetID,
656657
ReactMount.getID(ancestorNode)
657658
);

src/browser/ui/dom/DOMChildrenOperations.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ var DOMChildrenOperations = {
119119
'processUpdates(): Unable to find child %s of element. This ' +
120120
'probably means the DOM was unexpectedly mutated (e.g., by the ' +
121121
'browser), usually due to forgetting a <tbody> when using tables, ' +
122-
'nesting <p> or <a> tags, or using non-SVG elements in an <svg> '+
123-
'parent. Try inspecting the child nodes of the element with React ' +
124-
'ID `%s`.',
122+
'nesting tags like <form>, <p>, or <a>, or using non-SVG elements '+
123+
'in an <svg> parent. Try inspecting the child nodes of the element ' +
124+
'with React ID `%s`.',
125125
updatedIndex,
126126
parentID
127127
);

src/core/__tests__/ReactInstanceHandles-test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ describe('ReactInstanceHandles', function() {
147147
'Invariant Violation: findComponentRoot(..., .0.1:0:junk): ' +
148148
'Unable to find element. This probably means the DOM was ' +
149149
'unexpectedly mutated (e.g., by the browser), usually due to ' +
150-
'forgetting a <tbody> when using tables, nesting <p> or <a> tags, ' +
151-
'or using non-SVG elements in an <svg> parent. Try inspecting the ' +
152-
'child nodes of the element with React ' +
153-
'ID `.0`.'
150+
'forgetting a <tbody> when using tables, nesting tags ' +
151+
'like <form>, <p>, or <a>, or using non-SVG elements in an <svg> ' +
152+
'parent. ' +
153+
'Try inspecting the child nodes of the element with React ID `.0`.'
154154
);
155155
});
156156
});

0 commit comments

Comments
 (0)