无法阅读财产"长度"在玉中未定义

时间:2017-09-15 05:20:23

标签: json pug



table
      tbody
        tr
          th ID
          th Product Name
          th Price
          th Category
          th Action
        if data.length
         each item in data
          tr
            td #{item['_id']}
            td #{item['product_name']}
            td #{item['price']}
            td #{item['category']}
            td
               




对于此代码,我收到错误无法读取属性'长度'类型未定义

for this code i m getting error**cant read property 'length' of type undefined**

1 个答案:

答案 0 :(得分:0)

只要使用数据,你现在就做同样的事情,测试数据是否为空。