mirror of
https://github.com/nasa/openmct.git
synced 2025-05-11 21:13:02 +00:00
[Search] Type checking
Added type checking for arrays to indexItems.
This commit is contained in:
parent
836c508698
commit
f76f6548a5
@ -130,7 +130,11 @@ define(
|
|||||||
// 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
|
||||||
|
if (children.constructor === Array) {
|
||||||
indexItems(children);
|
indexItems(children);
|
||||||
|
} else {
|
||||||
|
indexItems([children]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user