Skip to content

Commit e1e2613

Browse files
committed
fix test
1 parent aa71387 commit e1e2613

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

packages/react-reconciler/src/ReactFiber.new.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,12 @@ export function createFiberFromLegacyHidden(
736736
fiber.lanes = lanes;
737737
// Adding a stateNode for legacy hidden because it's currently using
738738
// the offscreen implementation, which depends on a state node
739-
fiber.stateNode = {};
739+
const instance: OffscreenInstance = {
740+
isHidden: false,
741+
pendingMarkers: null,
742+
transitions: null,
743+
};
744+
fiber.stateNode = instance;
740745
return fiber;
741746
}
742747

packages/react-reconciler/src/ReactFiber.old.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,12 @@ export function createFiberFromLegacyHidden(
736736
fiber.lanes = lanes;
737737
// Adding a stateNode for legacy hidden because it's currently using
738738
// the offscreen implementation, which depends on a state node
739-
fiber.stateNode = {};
739+
const instance: OffscreenInstance = {
740+
isHidden: false,
741+
pendingMarkers: null,
742+
transitions: null,
743+
};
744+
fiber.stateNode = instance;
740745
return fiber;
741746
}
742747

0 commit comments

Comments
 (0)