Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Mar 15, 2020
1 parent ca4128c commit bed3eb9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberWorkLoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -2920,7 +2920,7 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber) {
'Cannot update a component from inside the function body of a ' +
'different component.\n' +
'"%s" updated "%s".',
getComponentName(workInProgress.type),
workInProgress && getComponentName(workInProgress.type),
getComponentName(fiber.type),
);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,7 @@ describe('ReactHooks', () => {
expect(console.error).toHaveBeenCalledTimes(2);
expect(console.error.calls.argsFor(0)[0]).toContain(
'Warning: Cannot update a component from inside the function body ' +
'of a different component.%s',
'of a different component.\n"%s" updated "%s".%s',
);
}
});
Expand Down

0 comments on commit bed3eb9

Please sign in to comment.