From f76f6548a59d5b1a76bcbf6cc88df96d3ddd8ed5 Mon Sep 17 00:00:00 2001 From: slhale Date: Thu, 6 Aug 2015 10:13:32 -0700 Subject: [PATCH] [Search] Type checking Added type checking for arrays to indexItems. --- platform/search/src/GenericSearchProvider.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platform/search/src/GenericSearchProvider.js b/platform/search/src/GenericSearchProvider.js index 1e32248eea..58be3f89d8 100644 --- a/platform/search/src/GenericSearchProvider.js +++ b/platform/search/src/GenericSearchProvider.js @@ -129,8 +129,12 @@ define( if (node.hasCapability('composition')) { // This node has children node.getCapability('composition').invoke().then(function (children) { - // Index the children - indexItems(children); + // Index the children + if (children.constructor === Array) { + indexItems(children); + } else { + indexItems([children]); + } }); } });