mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 14:18:16 +00:00
fix errors when navigated away from a layout that uses toolbar
This commit is contained in:
@ -520,6 +520,10 @@ define(['lodash'], function (_) {
|
||||
let selectedParent = selectionPath[1].context.item;
|
||||
let layoutItem = selectionPath[0].context.layoutItem;
|
||||
|
||||
if (!layoutItem) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (layoutItem.type === 'subobject-view') {
|
||||
if (toolbar['add-menu'].length === 0 && selectionPath[0].context.item.type === 'layout') {
|
||||
toolbar['add-menu'] = [getAddButton(selectedObjects, selectionPath)];
|
||||
|
Reference in New Issue
Block a user