From d586b2bcf4a32ce278d29dae6f99cf0db269fd24 Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Wed, 6 Feb 2019 16:37:09 +0000 Subject: [PATCH] Replaced current owner forward with current:null --- packages/shared/ReactSharedInternals.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/shared/ReactSharedInternals.js b/packages/shared/ReactSharedInternals.js index 5d2279362be24..3f914d00d596b 100644 --- a/packages/shared/ReactSharedInternals.js +++ b/packages/shared/ReactSharedInternals.js @@ -10,18 +10,13 @@ import React from 'react'; const ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; -// Add fallback for newer renderers running with older react package versions. +// Prevent newer renderers from RTE when used with older react package versions. // Current owner and dispatcher used to share the same ref, // but PR #14548 split them out to better support the react-debug-tools package. if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) { const {ReactCurrentOwner} = ReactSharedInternals; ReactSharedInternals.ReactCurrentDispatcher = { - get current() { - return ReactCurrentOwner.currentDispatcher; - }, - set current(value) { - ReactCurrentOwner.currentDispatcher = value; - }, + current: null, }; }