diff --git a/www/common/userObject.js b/www/common/userObject.js index 1a2229d40..a4b18d514 100644 --- a/www/common/userObject.js +++ b/www/common/userObject.js @@ -353,10 +353,12 @@ define([ } return paths; } - for (var e in root) { - var nPath = path.slice(); - nPath.push(e); - _findFileInRoot(nPath, file).forEach(addPaths); + if (isFolder(root)) { + for (var e in root) { + var nPath = path.slice(); + nPath.push(e); + _findFileInRoot(nPath, file).forEach(addPaths); + } } return paths;