部分页面报Cannot read property 'map' of undefined



  • 有些页面报错,有些不会;麻烦帮忙看看@Taro-小助手-honly

    Cannot read property 'map' of undefined; [Component] Lifetime Method Error @ pages/subPages/order/pages/confirmorder/confirmorder#attached
    TypeError: Cannot read property 'map' of undefined
    
    localhost:taroConvert pgp$ taro info
    👽 Taro v2.0.2
    
    
      Taro CLI 2.0.2 environment info:
        System:
          OS: macOS 10.15.2
          Shell: 3.2.57 - /bin/bash
        Binaries:
          Node: 12.14.0 - /usr/local/bin/node
          Yarn: 1.21.1 - /usr/local/bin/yarn
          npm: 6.13.6 - /usr/local/bin/npm
        npmPackages:
          @tarojs/components: 2.0.2 => 2.0.2 
          @tarojs/components-qa: 2.0.2 => 2.0.2 
          @tarojs/mini-runner: 2.0.2 => 2.0.2 
          @tarojs/router: 2.0.2 => 2.0.2 
          @tarojs/taro: 2.0.2 => 2.0.2 
          @tarojs/taro-alipay: 2.0.2 => 2.0.2 
          @tarojs/taro-h5: 2.0.2 => 2.0.2 
          @tarojs/taro-qq: 2.0.2 => 2.0.2 
          @tarojs/taro-quickapp: 2.0.2 => 2.0.2 
          @tarojs/taro-rn: 2.0.2 => 2.0.2 
          @tarojs/taro-swan: 2.0.2 => 2.0.2 
          @tarojs/taro-tt: 2.0.2 => 2.0.2 
          @tarojs/taro-weapp: 2.0.2 => 2.0.2 
          @tarojs/webpack-runner: 2.0.2 => 2.0.2 
          eslint-config-taro: 2.0.2 => 2.0.2 
          eslint-plugin-taro: 2.0.2 => 2.0.2 
          nerv-devtools: ^1.5.6 => 1.5.6 
          nervjs: ^1.5.6 => 1.5.6 
          stylelint-config-taro-rn: 2.0.2 => 2.0.2 
          stylelint-taro-rn: 2.0.2 => 2.0.2 
        npmGlobalPackages:
          typescript: 3.7.4
    
    

    @



  • @左鱼子 你map的那个元素初始化一下咯,赋个值


登录后回复