We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ebe478 commit fc16611Copy full SHA for fc16611
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "react-shallow-renderer",
3
- "version": "16.14.1",
+ "version": "16.14.2",
4
"description": "React package for shallow rendering.",
5
"main": "index.js",
6
"repository": "https://github.com/NMinhNguyen/react-shallow-renderer.git",
src/ReactShallowRenderer.js
@@ -500,7 +500,9 @@ See https://fb.me/react-invalid-hook-call for tips about how to debug and fix th
500
501
this._rendering = true;
502
this._element = element;
503
- this._context = getMaskedContext(elementType.contextTypes, context);
+ this._context = element.contextType
504
+ ? context
505
+ : getMaskedContext(elementType.contextTypes, context);
506
507
// Inner memo component props aren't currently validated in createElement.
508
let prevGetStack;
0 commit comments