How to fix TypeError: Cannot read property 'length' of undefined?

In lokalnom server everything works elegantly and VDS in console come out error
Good evening need your help faced with this problem after migrating site with virtual hosting on the VDS are faced with a problem I have encountered one plugin throws an error who knows how to fix what could be the problems on VPS everything works great but on VDS + ISPmanger gives an error ((
here's to a VDS fara.tmweb.ru/?p=5 (Add Track)
and that's on a normal hosting tajrap.tj/dohlot
if someone knows how to solve ready to reward Skype : qann_dill@icloud.com

}
function getData(files){
var filesData = [];
angular.forEach(files, function(file) {
if(file.error === false && file.newFileName.length > 0){
var temp = {};
if(file.sizeYt && file.ytID){
temp = {
'target_name':file.newFileName,
'size': $filter('formatBytes')(file.sizeYt,2),
'type': file.file.type
'ytID': file.ytID,
'duration': file.duration
};
}else{
temp = {
'target_name':file.newFileName,
'size': $filter('formatBytes')(file.size,2),
'type': file.file.type
};
}
}
June 8th 19 at 16:32
1 answer
June 8th 19 at 16:34
Maybe there is some sense in the try/catch block to count the length, to catch the error and assign a variable to zero, and check that variable? Apparently has some incorrect values, such pseudogene current and parent directories (if we are talking about files, of course).
I a teapot in this business can tell me more info how to fix I will thank you with money - Annie.Frami commented on June 8th 19 at 16:37
to be honest I do not really understand, but you can try one option. Then probably the problem is in this line if(file.error === false && file.newFileName.length > 0){
Need to check whether file file. Is the property isFile. You can make a check:
if( file.isFile ) {
...
}
If it is unclear or does not work, write. Let's try to solve it. - moises.Bernier commented on June 8th 19 at 16:40
if you need access I will give you add me on Skype live : qann_dill@icloud.com if you decide to my problem I'll pay you for the revision !! We are waiting for you ! - Annie.Frami commented on June 8th 19 at 16:43
Ruslan, I You mail letter was sent. - moises.Bernier commented on June 8th 19 at 16:46

Find more questions by tags WordPress