Skip to content

Commit 84affbd

Browse files
Matt Hargettfacebook-github-bot
authored andcommitted
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 facebook#18308 Differential Revision: D7230803 Pulled By: hramos fbshipit-source-id: 11e03183535a7453cee00dc1e795c27f2fd2bf5d
1 parent 19dd9a2 commit 84affbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/ReactNative/UIManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ if (Platform.OS === 'ios') {
7777
});
7878
}
7979
});
80-
} else if (Platform.OS === 'android' && UIManager.ViewManagerNames) {
80+
} else if (UIManager.ViewManagerNames) {
8181
UIManager.ViewManagerNames.forEach(viewManagerName => {
8282
defineLazyObjectProperty(UIManager, viewManagerName, {
8383
get: () => UIManager.getConstantsForViewManager(viewManagerName),

0 commit comments

Comments
 (0)