[Search] Type checking

Added type checking for arrays to indexItems.
This commit is contained in:
slhale 2015-08-06 10:13:32 -07:00
parent 836c508698
commit f76f6548a5

View File

@ -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]);
}
});
}
});