mirror of
https://github.com/nasa/openmct.git
synced 2025-05-11 04:52:57 +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')) {
|
if (node.hasCapability('composition')) {
|
||||||
// This node has children
|
// This node has children
|
||||||
node.getCapability('composition').invoke().then(function (children) {
|
node.getCapability('composition').invoke().then(function (children) {
|
||||||
// Index the children
|
// Index the children
|
||||||
indexItems(children);
|
if (children.constructor === Array) {
|
||||||
|
indexItems(children);
|
||||||
|
} else {
|
||||||
|
indexItems([children]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user