File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
packages/react-devtools-shared/src/backend/fiber Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -4563,16 +4563,15 @@ export function attach(
45634563 trackDebugInfoFromLazyType(nextFiber);
45644564 trackDebugInfoFromUsedThenables(nextFiber);
45654565
4566- if (
4567- nextFiber.tag === HostHoistable &&
4568- prevFiber.memoizedState !== nextFiber.memoizedState
4569- ) {
4566+ if (nextFiber.tag === HostHoistable) {
45704567 const nearestInstance = reconcilingParent;
45714568 if (nearestInstance === null) {
45724569 throw new Error('Did not expect a host hoistable to be the root');
45734570 }
4574- releaseHostResource(nearestInstance, prevFiber.memoizedState);
4575- aquireHostResource(nearestInstance, nextFiber.memoizedState);
4571+ if (prevFiber.memoizedState !== nextFiber.memoizedState) {
4572+ releaseHostResource(nearestInstance, prevFiber.memoizedState);
4573+ aquireHostResource(nearestInstance, nextFiber.memoizedState);
4574+ }
45764575 trackDebugInfoFromHostResource(nearestInstance, nextFiber);
45774576 } else if (
45784577 nextFiber.tag === HostComponent ||
You can’t perform that action at this time.
0 commit comments