File tree 1 file changed +4
-8
lines changed
packages/react-server/src
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -441,15 +441,11 @@ function RequestInstance(
441
441
onAllReady : void | ( ( ) => void ) ,
442
442
onFatalError : void | ( ( error : mixed ) => void ) ,
443
443
) {
444
- if (
445
- ReactSharedInternals . A !== null &&
446
- ReactSharedInternals . A !== DefaultAsyncDispatcher
447
- ) {
448
- throw new Error (
449
- 'Currently React only supports one RSC renderer at a time.' ,
450
- ) ;
444
+ const previousAsyncDispatcher = ReactSharedInternals . A ;
445
+ if ( previousAsyncDispatcher === null ) {
446
+ ReactSharedInternals . A = DefaultAsyncDispatcher ;
451
447
}
452
- ReactSharedInternals . A = DefaultAsyncDispatcher ;
448
+
453
449
if ( __DEV__ ) {
454
450
// Unlike Fizz or Fiber, we don't reset this and just keep it on permanently.
455
451
// This lets it act more like the AsyncDispatcher so that we can get the
You can’t perform that action at this time.
0 commit comments