diff --git a/platform/search/src/services/GenericSearchProvider.js b/platform/search/src/services/GenericSearchProvider.js index a8e7976c31..e05b58ca96 100644 --- a/platform/search/src/services/GenericSearchProvider.js +++ b/platform/search/src/services/GenericSearchProvider.js @@ -126,23 +126,13 @@ define( indexItem(node); indexed[id] = true; - // If this node has children, index those if (node && node.hasCapability && node.hasCapability('composition')) { // Make sure that this is async, so doesn't block up page $timeout(function () { // Get the children... - node.useCapability('composition').then(function (children) { - $timeout(function () { - // ... then index the children - if (children.constructor === Array) { - indexItems(children); - } else { - indexItems([children]); - } - }, 0); - }); - }, 0); + node.useCapability('composition').then(indexItems); + }, 0, false); } }); }