TypeError:Cannot read property 'type' of undefined

 For some reason the acquisition will often encounter TypeError: Can not read property 'type ' of undefined error, open no award.

Large search result to a " type error: unable to read undefined property" of the type " "

Do not modify the type, please make a backup before modifying advance to avoid irreparable,

There are many reasons for this error, we must first confirm the correctness of the code, can refer to the following code, and gradually slag, to ensure there are no errors,

If this does not solve the problem, you can contact me, provide paid repair, secondary development.

Contact the code in the bottom , take a close look oh! ! !

. 1  {
 2          title: 'Chongqing' ,
 . 3          Source: 'being collected' ,
 . 4          name: 'cqssc' ,
 . 5          enable: to true ,
 . 6          Timer: 'cqssc' ,
 . 7          Option: {
 . 8              Host: "127.0.0.1" ,
 . 9              timeout: 50000 ,
 10              path: '/cqssc/cqssc.php' ,
 . 11              headers: {
 12 is                  "the User-- Agent": "the Mozilla / 4.0 (compatible; MSIE 8.0; the Windows NT 6.0)"
13             }
14         },
15         parse:function(str){
16             try{
17                 str=str.substr(0,200);
18                 var reg=/<row expect="([\d\-]+?)" opencode="([\d\,]+?)" opentime="([\d\:\- ]+?)"/;
19                 var m;
20                 if(m=str.match(reg)){
21                     return {
22                         type:1,
23                         time:m[3],
24                         number:m[1],
25                         data:m[2]
26 is                      };
 27                  }
 28              } the catch (ERR) {
 29                  the throw ( 'Chongqing - analytical data is incorrect, development, repair collection QQ: 1,969,170,027 ' );
 30              }
 31 is          }
 32      },

 

Guess you like

Origin www.cnblogs.com/shenjingwa/p/11314965.html