fix: don't crash when price doesn't exist (sdk bug)

fixes https://github.com/lbryio/lbry-desktop/issues/3205
This commit is contained in:
Thomas Zarebczan 2019-12-14 15:13:13 -05:00
parent 029576f786
commit 4e184ccff0

View file

@ -39,8 +39,7 @@ class FilePrice extends React.PureComponent<Props> {
render() {
const { costInfo, showFullPrice, badge, inheritStyle, showLBC, hideFree } = this.props;
if (costInfo && !costInfo.cost && hideFree) {
if (costInfo && (!costInfo.cost || (!costInfo.cost && hideFree))) {
return null;
}