Permalink
Browse files

iOS: ignore double registration of lazy modules with chrome attached

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 80f92adf1f35e74ee6db0b2f445cc851463059cf
Showing with 2 additions and 4 deletions.
  1. +2 −4 React/CxxBridge/RCTCxxBridge.mm
@@ -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;
}
}

0 comments on commit 80f92ad

Please sign in to comment.