From c9463fe57a00323b2e2feb67eb8d46f5c9a53a10 Mon Sep 17 00:00:00 2001 From: p3k Date: Tue, 6 Jun 2006 17:18:03 +0000 Subject: [PATCH] fix bug causing an exception when there's no app directory at all --- Root/functions.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Root/functions.js b/Root/functions.js index dc6405f6..f7043f15 100644 --- a/Root/functions.js +++ b/Root/functions.js @@ -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]);