Skip to content

Commit

Permalink
iOS Logbox: always return a turbomodule instance
Browse files Browse the repository at this point in the history
Summary:
We have assertion to ensure that `getTurboModuleWithJsInvoker:` returns non-nullptr, so conditionally returning `nullptr` is not going to work.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D19103125

fbshipit-source-id: 663850c01e4db40cca96d254950ea5a7bf6b96b7
  • Loading branch information
fkgozali authored and facebook-github-bot committed Dec 16, 2019
1 parent 5e50d31 commit 6ceef13
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions React/CoreModules/RCTLogBox.mm
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,7 @@ + (BOOL)requiresMainQueueSetup

- (std::shared_ptr<facebook::react::TurboModule>)getTurboModuleWithJsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
{
if (RCTRedBoxGetEnabled()) {
return std::make_shared<facebook::react::NativeLogBoxSpecJSI>(self, jsInvoker);
}

return nullptr;
return std::make_shared<facebook::react::NativeLogBoxSpecJSI>(self, jsInvoker);
}

@end
Expand Down

0 comments on commit 6ceef13

Please sign in to comment.