Authored by 孙凯

add null.toJS() crash 的问题 review by daiqiang

... ... @@ -120,12 +120,12 @@ export default class GuangDetailProductCell extends Component {
render() {
let {data, sourceType, similarIndex, rowID} = this.props;
let name = data.get('product_name') ? data.get('product_name') : '';
let yh_exposureData = data.get('yh_exposureData', null).toJS();
let prd_id = data.get('product_id') ? data.get('product_id') : '';
let isGlobal = data.get('is_global') && data.get('is_global') == 'Y'; // 是否全球购商品
let is_limitbuy = data.get('is_limitbuy') && data.get('is_limitbuy') == 'Y'; // product.is_limitbuy=='Y'?true:false;
let product_skn = data.get('product_skn') ? data.get('product_skn') : '';
let yh_exposureData = data && data.get('yh_exposureData') ? data.get('yh_exposureData').toJS() : {};
let prd_id = data.get('product_id') ? data.get('product_id') : '';
let isGlobal = data.get('is_global') && data.get('is_global') == 'Y'; // 是否全球购商品
let is_limitbuy = data.get('is_limitbuy') && data.get('is_limitbuy') == 'Y'; // product.is_limitbuy=='Y'?true:false;
let product_skn = data.get('product_skn') ? data.get('product_skn') : '';
return (
<TouchableOpacity
style={styles.container}
... ...
... ... @@ -44,7 +44,7 @@ export default class RecommentProducts extends React.Component {
let price = '¥' + salePrice.toFixed(2);
let product_id = rowData.get('product_id')?rowData.get('product_id'):0;
let rec_id = rowData.get('rec_id')?rowData.get('rec_id'):'';
let yh_exposureData = rowData.get('yh_exposureData', null).toJS();
let yh_exposureData = rowData && rowData.get('yh_exposureData') ? rowData.get('yh_exposureData').toJS() : {};
return (
<TouchableOpacity activeOpacity={0.5} yh_exposureData={yh_exposureData} onPress={() => {
... ...