在此代码段中,“无法读取属性'hasOwnProperty'未定义”的原因是什么?

时间:2016-02-24 20:58:17

标签: javascript node.js lodash

我已经看过标题中的错误多次在我们的日志中出现。它是从下面的代码片段中的最后一行抛出的。根据我的研究,在尝试访问不存在的变量时会抛出此错误;但是,我的印象是我正在检查第1行的存在。

if(rental_application.rental_history && rental_application.rental_history.length > 0) {
    candidate.rental_history = [];
        _.each(rental_application.rental_history, function(rental) {

这可能是什么问题?

0 个答案:

没有答案