mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Report Redbox error when a component is not implemented
Summary: This diff ensures that a redbox is reported when a component is not registered in Fabric. Changelog: Ensure a redbox is reported when components are not registered in Fabric. Reviewed By: shergin Differential Revision: D17970793 fbshipit-source-id: 7afd7e6b0b9c0ff6d2bd475dbf6979d83fec093c
This commit is contained in:
committed by
Facebook Github Bot
parent
9ce3588f1e
commit
8425292eb4
@@ -130,7 +130,13 @@ ComponentDescriptor const &ComponentDescriptorRegistry::at(
|
||||
|
||||
auto it = _registryByName.find(unifiedComponentName);
|
||||
if (it == _registryByName.end()) {
|
||||
assert(providerRegistry_);
|
||||
// TODO: T54849676 Refactor this condition when RN Fabric Android starts
|
||||
// using ComponentDescriptorProviderRegistry class
|
||||
if (!providerRegistry_) {
|
||||
throw std::invalid_argument(
|
||||
("Unable to find componentDescriptor for " + unifiedComponentName)
|
||||
.c_str());
|
||||
}
|
||||
|
||||
mutex_.unlock_shared();
|
||||
providerRegistry_->request(unifiedComponentName.c_str());
|
||||
|
||||
Reference in New Issue
Block a user