From 976a4d835840e08f3dfd114757d7cddda5614b83 Mon Sep 17 00:00:00 2001
From: Tyler Schicke <tyler_schicke@brown.edu>
Date: Wed, 1 May 2019 02:07:11 -0400
Subject: Fixed tab titles when loading fresh db

---
 src/client/views/collections/CollectionDockingView.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/client/views/collections/CollectionDockingView.tsx')

diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index 958335425..6c8f3844a 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -261,9 +261,9 @@ export class CollectionDockingView extends React.Component<SubCollectionViewProp
         if (tab.hasOwnProperty("contentItem") && tab.contentItem.config.type !== "stack") {
             DocServer.GetRefField(tab.contentItem.config.props.documentId).then(async f => {
                 if (f instanceof Doc) {
-                    const tfield = await Cast(f.title, "string");
-                    if (tfield !== undefined) {
-                        tab.titleElement[0].textContent = f.Title;
+                    const title = Cast(f.title, "string");
+                    if (title !== undefined) {
+                        tab.titleElement[0].textContent = title;
                     }
                     const lf = await Cast(f.linkedFromDocs, listSpec(Doc));
                     const lt = await Cast(f.linkedToDocs, listSpec(Doc));
-- 
cgit v1.2.3-70-g09d2

