CC-3324: Uncaught TypeError: Cannot read property 'length' of undefined - if watched dir not defined
This commit is contained in:
parent
3df396756f
commit
238abd6f87
1 changed files with 5 additions and 3 deletions
|
@ -30,10 +30,12 @@ function generatePartitions(partitions){
|
||||||
var tr = $(row);
|
var tr = $(row);
|
||||||
lastElement.after(tr);
|
lastElement.after(tr);
|
||||||
|
|
||||||
|
if (partitions[i].dirs){
|
||||||
var watched_dirs_ul = $('#watched-dir-list-'+i);
|
var watched_dirs_ul = $('#watched-dir-list-'+i);
|
||||||
for (var j=0; j<partitions[i].dirs.length; j++){
|
for (var j=0; j<partitions[i].dirs.length; j++){
|
||||||
watched_dirs_ul.append('<li>'+partitions[i].dirs[j]+'</li>');
|
watched_dirs_ul.append('<li>'+partitions[i].dirs[j]+'</li>');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
lastElement = tr;
|
lastElement = tr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue