Skip to content

Commit

Permalink
fix: do not poison memoized props
Browse files Browse the repository at this point in the history
  • Loading branch information
theKashey committed Feb 20, 2019
1 parent 8befa5a commit 9f6ab6e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/internal/getReactStack.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ const markUpdate = ({ fiber }) => {
fiber.alternate.expirationTime = 1
fiber.alternate.type = fiber.type
}
fiber.memoizedProps = Object.assign(
{ cacheBusterProp: true },
fiber.memoizedProps,
)

if (fiber.memoizedProps && typeof fiber.memoizedProps === 'object') {
fiber.memoizedProps = Object.assign(
{ cacheBusterProp: true },
fiber.memoizedProps,
)
}
}

export const cleanupReact = () => {
Expand Down

0 comments on commit 9f6ab6e

Please sign in to comment.