Skip to content

Commit d586b2b

Browse files
author
Brian Vaughn
committed
Replaced current owner forward with current:null
1 parent e8404c7 commit d586b2b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

packages/shared/ReactSharedInternals.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,13 @@ import React from 'react';
1010
const ReactSharedInternals =
1111
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1212

13-
// Add fallback for newer renderers running with older react package versions.
13+
// Prevent newer renderers from RTE when used with older react package versions.
1414
// Current owner and dispatcher used to share the same ref,
1515
// but PR #14548 split them out to better support the react-debug-tools package.
1616
if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
1717
const {ReactCurrentOwner} = ReactSharedInternals;
1818
ReactSharedInternals.ReactCurrentDispatcher = {
19-
get current() {
20-
return ReactCurrentOwner.currentDispatcher;
21-
},
22-
set current(value) {
23-
ReactCurrentOwner.currentDispatcher = value;
24-
},
19+
current: null,
2520
};
2621
}
2722

0 commit comments

Comments
 (0)