mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Bring missing changes to 0.58-stable branch
This reverts commit b864e7e63e.
This commit is contained in:
@@ -90,13 +90,13 @@ folly::Optional<ModuleConfig> ModuleRegistry::getConfig(const std::string& name)
|
||||
|
||||
if (it == modulesByName_.end()) {
|
||||
if (unknownModules_.find(name) != unknownModules_.end()) {
|
||||
return nullptr;
|
||||
return folly::none;
|
||||
}
|
||||
if (!moduleNotFoundCallback_ ||
|
||||
!moduleNotFoundCallback_(name) ||
|
||||
(it = modulesByName_.find(name)) == modulesByName_.end()) {
|
||||
unknownModules_.insert(name);
|
||||
return nullptr;
|
||||
return folly::none;
|
||||
}
|
||||
}
|
||||
size_t index = it->second;
|
||||
@@ -143,7 +143,7 @@ folly::Optional<ModuleConfig> ModuleRegistry::getConfig(const std::string& name)
|
||||
|
||||
if (config.size() == 2 && config[1].empty()) {
|
||||
// no constants or methods
|
||||
return nullptr;
|
||||
return folly::none;
|
||||
} else {
|
||||
return ModuleConfig{index, config};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user