Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
lunaruan committed Jun 30, 2022
1 parent aa71387 commit e1e2613
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/react-reconciler/src/ReactFiber.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,12 @@ export function createFiberFromLegacyHidden(
fiber.lanes = lanes;
// Adding a stateNode for legacy hidden because it's currently using
// the offscreen implementation, which depends on a state node
fiber.stateNode = {};
const instance: OffscreenInstance = {
isHidden: false,
pendingMarkers: null,
transitions: null,
};
fiber.stateNode = instance;
return fiber;
}

Expand Down
7 changes: 6 additions & 1 deletion packages/react-reconciler/src/ReactFiber.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,12 @@ export function createFiberFromLegacyHidden(
fiber.lanes = lanes;
// Adding a stateNode for legacy hidden because it's currently using
// the offscreen implementation, which depends on a state node
fiber.stateNode = {};
const instance: OffscreenInstance = {
isHidden: false,
pendingMarkers: null,
transitions: null,
};
fiber.stateNode = instance;
return fiber;
}

Expand Down

0 comments on commit e1e2613

Please sign in to comment.