get rid of root (#5483)

This commit is contained in:
Scott Bell 2022-07-12 03:02:40 +02:00 committed by GitHub
parent 2540d96617
commit 0e707150e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,7 +107,12 @@ export default {
this.preview();
} else {
const objectPath = this.result.originalPath;
const resultUrl = objectPathToUrl(this.openmct, objectPath);
let resultUrl = objectPathToUrl(this.openmct, objectPath);
// get rid of ROOT if extant
if (resultUrl.includes('/ROOT')) {
resultUrl = resultUrl.split('/ROOT').join('');
}
this.openmct.router.navigate(resultUrl);
}
},