diff --git a/www/common/userObject.js b/www/common/userObject.js index 5cf532438..a9068afe6 100644 --- a/www/common/userObject.js +++ b/www/common/userObject.js @@ -374,10 +374,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;