optional style property

This commit is contained in:
Martin Bielik 2016-06-02 14:16:53 +02:00
parent 57cb561e30
commit 3b1de6174d

View File

@ -19,7 +19,7 @@ var LinearGradient = React.createClass({
// inherit container borderRadius until this issue is resolved:
// https://github.com/facebook/react-native/issues/3198
var flatStyle = style && StyleSheet.flatten(style);
var flatStyle = style && StyleSheet.flatten(style) || {};
var borderRadius = flatStyle.borderRadius || 0;
// this is the format taken by: