mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix NativePlatformConstants
Summary: When in debug mode, PlatformConstants doesn't have a `ServerHost` constant. This wasn't captured by `NativePlatformConstants`. Changelog: [Android][Fixed] - Make sure ServerHost is optional in NativePlatformConstants.js Reviewed By: rickhanlonii Differential Revision: D19091270 fbshipit-source-id: 4b3ac73a4ab6111b3e433ecca01cc769e8cdec6b
This commit is contained in:
committed by
Facebook Github Bot
parent
38af48d5fd
commit
048f88a33a
+3
-2
@@ -47,11 +47,12 @@ public abstract class NativePlatformConstantsAndroidSpec extends ReactContextBas
|
||||
"Version",
|
||||
"reactNativeVersion",
|
||||
"Model",
|
||||
"ServerHost",
|
||||
"isTesting",
|
||||
"Release"
|
||||
));
|
||||
Set<String> optionalFlowConstants = new HashSet<>();
|
||||
Set<String> optionalFlowConstants = new HashSet<>(Arrays.asList(
|
||||
"ServerHost"
|
||||
));
|
||||
Set<String> undeclaredConstants = new HashSet<>(constants.keySet());
|
||||
undeclaredConstants.removeAll(obligatoryFlowConstants);
|
||||
undeclaredConstants.removeAll(optionalFlowConstants);
|
||||
|
||||
Reference in New Issue
Block a user