From 84affbd6a371dd865a3550b1fde1ebabee921341 Mon Sep 17 00:00:00 2001 From: Matt Hargett Date: Mon, 12 Mar 2018 08:40:14 -0700 Subject: [PATCH] Loosen Platform check to allow better code sharing for out-of-tree platforms Summary: Don't lock out other non-iOS platforms (e.g. Windows) with an overly specific check. This change allows this JS file to be re-used instead of copied and modified. There was one other instance of this pattern, but I'll submit it separate for easier cherry-picking. Tested Android and iOS playground on simulators. [GENERAL] [ENHANCEMENT] - some core ReactNative JS library files will be easier to re-use across RN platforms. Closes https://github.com/facebook/react-native/pull/18308 Differential Revision: D7230803 Pulled By: hramos fbshipit-source-id: 11e03183535a7453cee00dc1e795c27f2fd2bf5d --- Libraries/ReactNative/UIManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/ReactNative/UIManager.js b/Libraries/ReactNative/UIManager.js index 0ad18a0b27dcdb..946d2233c5f132 100644 --- a/Libraries/ReactNative/UIManager.js +++ b/Libraries/ReactNative/UIManager.js @@ -77,7 +77,7 @@ if (Platform.OS === 'ios') { }); } }); -} else if (Platform.OS === 'android' && UIManager.ViewManagerNames) { +} else if (UIManager.ViewManagerNames) { UIManager.ViewManagerNames.forEach(viewManagerName => { defineLazyObjectProperty(UIManager, viewManagerName, { get: () => UIManager.getConstantsForViewManager(viewManagerName),