mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
[Flight] Don't dedupe references to deferred objects (#33741)
If we're about to defer an object, then we shouldn't store a reference to it because then we can end up deduping by referring to the deferred string. If in a different context, we should still be able to emit the object.
This commit is contained in:
parent
956d770adf
commit
8ba3501cd9
|
|
@ -4345,6 +4345,12 @@ function renderDebugModel(
|
||||||
if (parentReference !== undefined) {
|
if (parentReference !== undefined) {
|
||||||
// If the parent has a reference, we can refer to this object indirectly
|
// If the parent has a reference, we can refer to this object indirectly
|
||||||
// through the property name inside that parent.
|
// through the property name inside that parent.
|
||||||
|
if (counter.objectLimit <= 0 && !doNotLimit.has(value)) {
|
||||||
|
// If we are going to defer this, don't dedupe it since then we'd dedupe it to be
|
||||||
|
// deferred in future reference.
|
||||||
|
return serializeDeferredObject(request, value);
|
||||||
|
}
|
||||||
|
|
||||||
let propertyName = parentPropertyName;
|
let propertyName = parentPropertyName;
|
||||||
if (isArray(parent) && parent[0] === REACT_ELEMENT_TYPE) {
|
if (isArray(parent) && parent[0] === REACT_ELEMENT_TYPE) {
|
||||||
// For elements, we've converted it to an array but we'll have converted
|
// For elements, we've converted it to an array but we'll have converted
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user