mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 17:33:23 +00:00
fix: no deleted objects in locator search (#6038)
Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
This commit is contained in:
parent
b82649772f
commit
80f89c7609
@ -792,12 +792,17 @@ export default {
|
||||
|
||||
for (const result of results) {
|
||||
if (!abortSignal.aborted) {
|
||||
// Don't show deleted objects in search results
|
||||
if (result.location === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
resultPromises.push(this.openmct.objects.getOriginalPath(result.identifier).then((objectPath) => {
|
||||
// removing the item itself, as the path we pass to buildTreeItem is a parent path
|
||||
objectPath.shift();
|
||||
|
||||
// if root, remove, we're not using in object path for tree
|
||||
let lastObject = objectPath.length ? objectPath[objectPath.length - 1] : false;
|
||||
const lastObject = objectPath.length ? objectPath[objectPath.length - 1] : false;
|
||||
if (lastObject && lastObject.type === 'root') {
|
||||
objectPath.pop();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user