aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-06-23 17:45:01 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-06-23 17:45:01 -0400
commit12b4fbdf9a8e94faf8c318ef6b90afb7ac94dd44 (patch)
treec8ad868da83cc6dec7690332d2117f8fae637fd3 /src
parenta4b62a15d429ed8d44c6c4d083c8db7232b0b023 (diff)
parent6e5cd0e991e2e6d7ae8de1d73ff273ba0737355c (diff)
Merge branch 'master' into templatesMac
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionDockingView.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index b403000ad..9aef17234 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -136,10 +136,11 @@ export class CollectionDockingView extends React.Component<SubCollectionViewProp
var newContentItem = this._goldenLayout.root.layoutManager.createContentItem(newItemStackConfig, this._goldenLayout);
- if (this._goldenLayout.root.contentItems[0].isRow) {
+ if (this._goldenLayout.root.contentItems.length === 0) {
+ this._goldenLayout.root.addChild(newContentItem);
+ } else if (this._goldenLayout.root.contentItems[0].isRow) {
this._goldenLayout.root.contentItems[0].addChild(newContentItem);
- }
- else {
+ } else {
var collayout = this._goldenLayout.root.contentItems[0];
var newRow = collayout.layoutManager.createContentItem({ type: "row" }, this._goldenLayout);
collayout.parent.replaceChild(collayout, newRow);