阅读背景:

未捕获的TypeError:无法读取未定义的属性“state”

来源:互联网 

I have the following function:

我有以下功能:

extractCountries: function() {
    var newCountries = [];
    _.forEach(this.props.countries, function(country) {

        var monthTemp = Utils.thisMonthTemp(parseFloat(country["name"]["temperature"]));

        if(parseFloat(country["name"]["safety"]) > this.state.minSafety &&
           parseFloat(country["name"]["nature"]) > this.state.minNature &&
           this.state.weather.min <= monthTemp &&
           monthTemp <= this.state.weather.max) {

            newCountries.push(country);
        }
    }).bind(this);
    return newCountries;
  }
extr



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: