We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 802c735 commit 68fe402Copy full SHA for 68fe402
src/ReactShallowRenderer.js
@@ -515,7 +515,9 @@ See https://fb.me/react-invalid-hook-call for tips about how to debug and fix th
515
516
this._rendering = true;
517
this._element = element;
518
- this._context = getMaskedContext(elementType.contextTypes, context);
+ this._context = element.contextType
519
+ ? context
520
+ : getMaskedContext(elementType.contextTypes, context);
521
522
// Inner memo component props aren't currently validated in createElement.
523
let prevGetStack;
0 commit comments