Skip to content

Commit

Permalink
iOS: ignore double registration of lazy modules with chrome attached
Browse files Browse the repository at this point in the history
Summary: Depending on when Chrome debugger is attached, modules may get double registered. Simply ignore it for this case. The redbox was not a fatal error, which can be dismissed.

Reviewed By: shergin

Differential Revision: D12996107

fbshipit-source-id: 292f63102337077848842ca46b3daed08b1cae12
  • Loading branch information
fkgozali authored and facebook-github-bot committed Nov 9, 2018
1 parent d7865eb commit 80f92ad
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions React/CxxBridge/RCTCxxBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -666,10 +666,8 @@ - (void)registerExtraLazyModules
// The new module returned nil from init, so use the old module
continue;
} else if ([moduleData.moduleClass new] != nil) {
// Both modules were non-nil, so it's unclear which should take precedence
RCTLogError(@"Attempted to register RCTBridgeModule class %@ for the "
"name '%@', but name was already registered by class %@",
moduleClass, moduleName, moduleData.moduleClass);
// Use existing module since it was already loaded but not yet instantiated.
continue;
}
}

Expand Down

0 comments on commit 80f92ad

Please sign in to comment.