fix bug causing an exception when there's no app directory at all
This commit is contained in:
parent
437dfb94d3
commit
c9463fe57a
1 changed files with 2 additions and 0 deletions
|
@ -28,6 +28,8 @@ function getAllApplications() {
|
|||
var appsDir = this.getAppsHome();
|
||||
var dir = appsDir.list();
|
||||
var arr = new Array();
|
||||
if (!dir)
|
||||
return arr;
|
||||
for (var i = 0; i < dir.length; i++) {
|
||||
if (dir[i].toLowerCase() != "cvs" && dir[i].indexOf(".") == -1)
|
||||
arr[arr.length] = this.getApp(dir[i]);
|
||||
|
|
Loading…
Add table
Reference in a new issue