mirror of
https://github.com/nasa/openmct.git
synced 2025-06-01 23:20:50 +00:00
[Search] Checks for folders
Search now (again) checks to not add folders to the results list. This later should be made into a policy.
This commit is contained in:
parent
b35fddefc0
commit
d7dd53c2da
@ -110,7 +110,14 @@ define(function () {
|
|||||||
|
|
||||||
for (j = 0; j < resultsLength; j++) {
|
for (j = 0; j < resultsLength; j++) {
|
||||||
id = ids[j];
|
id = ids[j];
|
||||||
output.push(objects[id]);
|
|
||||||
|
// Include any item except folders
|
||||||
|
// TODO: Should have a policy for this
|
||||||
|
if (objects[id].getModel) {
|
||||||
|
if (objects[id].getModel().type !== "folder") {
|
||||||
|
output.push(objects[id]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('final output', output);
|
console.log('final output', output);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user