mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Don't throw when accessing view config
Summary: It turns out that it's expected in certain cases for `UIManager.getViewManagerConfig` to return null: https://fburl.com/4h4pqtd7 Instead of throwing when you try to call that function, let's log something and return null. Reviewed By: fkgozali Differential Revision: D15791367 fbshipit-source-id: 71cf14071d877070b4f8b2d72eaa2f10beac38db
This commit is contained in:
committed by
Facebook Github Bot
parent
533932ada9
commit
3f951378bf
@@ -11,9 +11,10 @@
|
||||
|
||||
module.exports = {
|
||||
getViewManagerConfig: (viewManagerName: string) => {
|
||||
throw new Error(
|
||||
'Attempting to get config for view manager ' + viewManagerName,
|
||||
console.warn(
|
||||
'Attempting to get config for view manager: ' + viewManagerName,
|
||||
);
|
||||
return null;
|
||||
},
|
||||
getConstants: () => ({}),
|
||||
getConstantsForViewManager: (viewManagerName: string) => {},
|
||||
|
||||
Reference in New Issue
Block a user