mirror of
https://github.com/nasa/openmct.git
synced 2025-01-31 08:25:31 +00:00
[Search] Type checking
Added type checking for arrays to indexItems.
This commit is contained in:
parent
836c508698
commit
f76f6548a5
@ -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]);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user