首页 > 其他分享 >Teamcenter AWC开发,代码报错Error: Cannot read properties of undefined (reading 'hasOwnProperty')

Teamcenter AWC开发,代码报错Error: Cannot read properties of undefined (reading 'hasOwnProperty')

时间:2024-07-22 09:53:22浏览次数:16  
标签:soaService undefined min read js 报错 eval angular lodash

1、调用setProperties接口报错

await soaSvc.post('Core-2010-09-DataManagement', 'setProperties',info)

 Error: Cannot read properties of undefined (reading 'hasOwnProperty')
    at Object.createError (soaService.js:486:1)
    at eval (soaService.js:946:1)
    at processQueue (angular.js:18117:1)
    at eval (angular.js:18165:1)
    at Scope.$digest (angular.js:19284:1)
    at eval (angular.js:19604:1)
    at TaskTracker.completeTask (angular.js:21445:1)
    at eval (angular.js:6911:1)
    at _splmStatsJsWrapperFunction (splmStatsJsService.js:126:1)Caused by: TypeError: Cannot read properties of undefined (reading 'hasOwnProperty')
    at eval (soaService.js:332:1)
    at eval (lodash.min.js:54:1)
    at ue (lodash.min.js:35:1)
    at eval (lodash.min.js:53:1)
    at Function._f (lodash.min.js:84:1)
    at defaultAndValidateElementRecurse (soaService.js:330:1)
    at validateElementType (soaService.js:239:1)
    at validateElementType (soaService.js:252:1)
    at forEachdefaultAndValidateElementRecurse (soaService.js:382:1)
    at eval (lodash.min.js:54:1)

  

2、分析得出,是因为传入的参数数组中有一个空元素导致的。

 

3、解决办法:

把空元素去掉就可以了

 

标签:soaService,undefined,min,read,js,报错,eval,angular,lodash
From: https://www.cnblogs.com/wwssgg/p/18315464

相关文章