fix errors when navigated away from a layout that uses toolbar

This commit is contained in:
Deep Tailor
2020-03-27 10:15:09 -07:00
parent eedc0f13bc
commit 6b00af6ece
3 changed files with 12 additions and 2 deletions

View File

@ -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)];