콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
18528 화면

We are recently getting more and more odoo client errors. There is also then a link to an address, which shows a java script file. Just recently we have increased the number of people using the system from about 10 to 15 people. Might have the increased load on the server have anything to do with it?

http://odoo-01.t.local:8086/web/js/web.assets_backend/185d8db:4987

We are using version 8.0-20150423

Thank you for any help or advice

아바타
취소
작성자

Short Update: Apparently when you are activating the developer mode the error goes away. We are currently testing this in detail but the system appears to be working fine in developer mode. Does anyone know how to avoid this error in normal mode?

베스트 답변

In JavaScript almost everything is an object, null and undefined are exception. When you try to access an undefined variable it always returns undefined and we cannot get or set any property of undefined. In that case, an application will throw Uncaught TypeError cannot set property of undefined. 

In most cases, you are missing the initialization . So, you need to initialize the variable first. Moreover, if you are not sure a variable that will always have some value, the best practice is to check the value of variables for null or undefined before using them. If you just want to check whether there's any value, you can do:

if( value ) {

  //do something

}

Or, if you do not know whether a variable exists (that means, if it was declared) you should check with the typeof operator .

if ( typeof(some_variable) !== "undefined" && some_variable !== null ) {

  //deal with value

}

http://net-informations.com/js/err/set.htm



아바타
취소
관련 게시물 답글 화면 활동
1
3월 24
1663
1
6월 23
4140
0
3월 20
2613
1
12월 15
6691
0
3월 15
4784