You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js
+75-59Lines changed: 75 additions & 59 deletions
Original file line number
Diff line number
Diff line change
@@ -11535,7 +11535,7 @@ var ownerHasKeyUseWarning;
11535
11535
var ownerHasFunctionTypeWarning;
11536
11536
var ownerHasSymbolTypeWarning;
11537
11537
11538
-
var warnForMissingKey = function (child, returnFiber) {};
11538
+
var warnForMissingKey = function (returnFiber, workInProgress, child) {};
11539
11539
11540
11540
{
11541
11541
didWarnAboutMaps = false;
@@ -11550,7 +11550,7 @@ var warnForMissingKey = function (child, returnFiber) {};
11550
11550
ownerHasFunctionTypeWarning = {};
11551
11551
ownerHasSymbolTypeWarning = {};
11552
11552
11553
-
warnForMissingKey = function (child, returnFiber) {
11553
+
warnForMissingKey = function (returnFiber, workInProgress, child) {
11554
11554
if (child === null || typeof child !== 'object') {
11555
11555
return;
11556
11556
}
@@ -11609,15 +11609,9 @@ var warnForMissingKey = function (child, returnFiber) {};
11609
11609
// Give the component that originally created this child.
11610
11610
childOwnerAppendix = " It was passed a child from " + ownerName + ".";
11611
11611
}
11612
-
} // We create a fake Fiber for the child to log the stack trace from.
11613
-
// TODO: Refactor the warnForMissingKey calls to happen after fiber creation
11614
-
// so that we can get access to the fiber that will eventually be created.
11615
-
// That way the log can show up associated with the right instance in DevTools.
11616
-
11612
+
}
11617
11613
11618
-
var fiber = createFiberFromElement(child, returnFiber.mode, 0);
11619
-
fiber.return = returnFiber;
11620
-
runWithFiberInDEV(fiber, function () {
11614
+
runWithFiberInDEV(workInProgress, function () {
11621
11615
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://react.dev/link/warning-keys for more information.', currentComponentErrorInfo, childOwnerAppendix);
11622
11616
});
11623
11617
};
@@ -12214,7 +12208,7 @@ function createChildReconciler(shouldTrackSideEffects) {
12214
12208
*/
12215
12209
12216
12210
12217
-
function warnOnInvalidKey(child, knownKeys, returnFiber) {
12211
+
function warnOnInvalidKey(returnFiber, workInProgress, child, knownKeys) {
12218
12212
{
12219
12213
if (typeof child !== 'object' || child === null) {
12220
12214
return knownKeys;
@@ -12223,7 +12217,7 @@ function createChildReconciler(shouldTrackSideEffects) {
@@ -12241,8 +12235,9 @@ function createChildReconciler(shouldTrackSideEffects) {
12241
12235
break;
12242
12236
}
12243
12237
12244
-
error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);
12245
-
12238
+
runWithFiberInDEV(workInProgress, function () {
12239
+
error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);
12240
+
});
12246
12241
break;
12247
12242
12248
12243
case REACT_LAZY_TYPE:
@@ -12253,7 +12248,7 @@ function createChildReconciler(shouldTrackSideEffects) {
0 commit comments