File tree 3 files changed +15
-2
lines changed
react-devtools-shared/src 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -2345,6 +2345,18 @@ export function attach(
2345
2345
const prevFallbackChildSet = prevFiberChild
2346
2346
? prevFiberChild . sibling
2347
2347
: null ;
2348
+
2349
+ if ( prevFallbackChildSet == null && nextFallbackChildSet != null ) {
2350
+ mountFiberRecursively (
2351
+ nextFallbackChildSet ,
2352
+ shouldIncludeInTree ? nextFiber : parentFiber ,
2353
+ true ,
2354
+ traceNearestHostComponentUpdate ,
2355
+ ) ;
2356
+
2357
+ shouldResetChildren = true ;
2358
+ }
2359
+
2348
2360
if (
2349
2361
nextFallbackChildSet != null &&
2350
2362
prevFallbackChildSet != null &&
Original file line number Diff line number Diff line change @@ -320,7 +320,7 @@ export function installHook(target: any): DevToolsHook | null {
320
320
321
321
let uidCounter = 0 ;
322
322
323
- function inject ( renderer : ReactRenderer ) {
323
+ function inject ( renderer : ReactRenderer ) : number {
324
324
const id = ++ uidCounter ;
325
325
renderers . set ( id , renderer ) ;
326
326
Original file line number Diff line number Diff line change @@ -52,10 +52,11 @@ export const isDevToolsPresent =
52
52
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' ;
53
53
54
54
export function injectInternals ( internals : Object ) : boolean {
55
- if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ) {
55
+ if ( ! isDevToolsPresent ) {
56
56
// No DevTools
57
57
return false ;
58
58
}
59
+
59
60
const hook = __REACT_DEVTOOLS_GLOBAL_HOOK__ ;
60
61
if ( hook . isDisabled ) {
61
62
// This isn't a real property on the hook, but it can be set to opt out
You can’t perform that action at this time.
0 commit comments