mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 12:05:06 +00:00
iOS: fixed RCTDevSettings executor-override handling
Summary: RCTDevSettings incorrectly assigned "bad" executor-override class to the executor instead of checking if the class exists before assigning it. It should really check if the class exists, and fallback to defaults otherwise. Reviewed By: mmmulani, yungsters Differential Revision: D4655926 fbshipit-source-id: 48c8fe28f22aaa8430752411ce5e6e858dbd4b32
This commit is contained in:
parent
7e2d7f0c98
commit
c04e79e85a
@ -228,8 +228,9 @@ RCT_EXPORT_METHOD(setIsDebuggingRemotely:(BOOL)enabled)
|
|||||||
{
|
{
|
||||||
// This value is passed as a command-line argument, so fall back to reading from NSUserDefaults directly
|
// This value is passed as a command-line argument, so fall back to reading from NSUserDefaults directly
|
||||||
NSString *executorOverride = [[NSUserDefaults standardUserDefaults] stringForKey:kRCTDevSettingExecutorOverrideClass];
|
NSString *executorOverride = [[NSUserDefaults standardUserDefaults] stringForKey:kRCTDevSettingExecutorOverrideClass];
|
||||||
if (executorOverride) {
|
Class executorOverrideClass = executorOverride ? NSClassFromString(executorOverride) : nil;
|
||||||
self.executorClass = NSClassFromString(executorOverride);
|
if (executorOverrideClass) {
|
||||||
|
self.executorClass = executorOverrideClass;
|
||||||
} else {
|
} else {
|
||||||
BOOL enabled = self.isRemoteDebuggingAvailable && self.isDebuggingRemotely;
|
BOOL enabled = self.isRemoteDebuggingAvailable && self.isDebuggingRemotely;
|
||||||
self.executorClass = enabled ? objc_getClass("RCTWebSocketExecutor") : nil;
|
self.executorClass = enabled ? objc_getClass("RCTWebSocketExecutor") : nil;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user