From b6f5b5112e9b64766bee82420f7b815a36bf1641 Mon Sep 17 00:00:00 2001 From: ooHmartY Date: Thu, 4 Apr 2019 21:29:20 -0700 Subject: [PATCH] [enzyme-adapter-react-16] [fix] avoid invariant violation in provider --- packages/enzyme-adapter-react-16/src/detectFiberTags.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/enzyme-adapter-react-16/src/detectFiberTags.js b/packages/enzyme-adapter-react-16/src/detectFiberTags.js index f6b7ac11b..f1368da17 100644 --- a/packages/enzyme-adapter-react-16/src/detectFiberTags.js +++ b/packages/enzyme-adapter-react-16/src/detectFiberTags.js @@ -62,13 +62,13 @@ module.exports = function detectFiberTags() { ? getFiber(React.createElement(Ctx.Consumer, null, () => null)).tag : -1, ContextProvider: supportsContext - ? getFiber(React.createElement(Ctx.Provider, { value: null })).tag + ? getFiber(React.createElement(Ctx.Provider, { value: null }, null)).tag : -1, ForwardRef: supportsForwardRef ? getFiber(React.createElement(FwdRef)).tag : -1, Profiler: supportsProfiler - ? getFiber(React.createElement(React.unstable_Profiler, { id: 'mock', onRender: () => {} })).tag + ? getFiber(React.createElement(React.unstable_Profiler, { id: 'mock', onRender() {} })).tag : -1, }; };