From d7dd53c2da1dd47e58f1795b96777410d00ec5f9 Mon Sep 17 00:00:00 2001 From: shale Date: Tue, 14 Jul 2015 09:45:31 -0700 Subject: [PATCH] [Search] Checks for folders Search now (again) checks to not add folders to the results list. This later should be made into a policy. --- platform/features/search/src/SearchController.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/platform/features/search/src/SearchController.js b/platform/features/search/src/SearchController.js index bfb5cf0b68..a3ed138a81 100644 --- a/platform/features/search/src/SearchController.js +++ b/platform/features/search/src/SearchController.js @@ -110,7 +110,14 @@ define(function () { for (j = 0; j < resultsLength; j++) { id = ids[j]; - output.push(objects[id]); + + // Include any item except folders + // TODO: Should have a policy for this + if (objects[id].getModel) { + if (objects[id].getModel().type !== "folder") { + output.push(objects[id]); + } + } } console.log('final output', output);