Skip to content

Commit 5364416

Browse files
committed
fix: two views with same name
1 parent 12f77ce commit 5364416

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/MapView.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,18 +1047,18 @@ class MapView extends React.Component<MapViewProps> {
10471047
// };
10481048
// }
10491049

1050-
const ComponentName = 'OsmMap';
1051-
const OsmMap =
1052-
UIManager.getViewManagerConfig(ComponentName) != null
1053-
? requireNativeComponent<NativeProps>(ComponentName)
1054-
: () => {
1055-
throw new Error(LINKING_ERROR);
1056-
};
10571050
return <OsmMap {...props} />;
10581051
}
10591052
}
1060-
1061-
export const AnimatedMapView = Animated.createAnimatedComponent(MapView);
1053+
const ComponentName = 'OsmMap';
1054+
1055+
const OsmMap =
1056+
UIManager.getViewManagerConfig(ComponentName) != null
1057+
? requireNativeComponent<NativeProps>(ComponentName)
1058+
: () => {
1059+
throw new Error(LINKING_ERROR);
1060+
};
1061+
const AnimatedMapView = Animated.createAnimatedComponent(MapView);
10621062

10631063
MapView.Animated = AnimatedMapView;
10641064

0 commit comments

Comments
 (0)