diff options
author | bobzel <zzzman@gmail.com> | 2020-09-03 11:32:43 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-09-03 11:32:43 -0400 |
commit | eb13fea97b85771b67a69a657309dd45a9a3febf (patch) | |
tree | f0d9cbef1d517108e1277909ed6f77401b313048 /src/client/views/PropertiesView.tsx | |
parent | bc0c72f9d53fe76ce9f5592e60681a3e18fa7430 (diff) |
prevented dashboards from being the selectedDocument to avoid issues with the tab layout getting corrupted.
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r-- | src/client/views/PropertiesView.tsx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 6e029188a..5c83eabd1 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -45,11 +45,9 @@ export class PropertiesView extends React.Component<PropertiesViewProps> { @computed get selectedDoc() { return SelectionManager.SelectedSchemaDoc() || this.selectedDocumentView?.rootDoc; } @computed get selectedDocumentView() { - if (SelectionManager.SelectedDocuments().length) { - return SelectionManager.SelectedDocuments()[0]; - } else if (PresBox.Instance && PresBox.Instance._selectedArray.length) { - return DocumentManager.Instance.getDocumentView(PresBox.Instance.rootDoc); - } else { return undefined; } + if (SelectionManager.SelectedDocuments().length) return SelectionManager.SelectedDocuments()[0]; + if (PresBox.Instance && PresBox.Instance._selectedArray.length) return DocumentManager.Instance.getDocumentView(PresBox.Instance.rootDoc); + return undefined; } @computed get isPres(): boolean { if (this.selectedDoc?.type === DocumentType.PRES) return true; |