'TypeError: Cannot read property 'length' of undefined' when creating a function for a cart. This is the code snippet. What could be the issue?

前端 未结 0 857
独厮守ぢ
独厮守ぢ 2021-02-13 22:11
import useStyles from \'./styles\';

const Cart = ({ cart }) => {
    const classes = useStyles();

    const isEmpty = !cart.line_items.length;

    const EmptyCart          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题