From 6ef7d8f10b2ec78491b66ea4e2f6cebce3b0230a Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Tue, 12 Feb 2019 16:18:02 -0500 Subject: Changed initialization of main docs --- src/client/views/Main.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src') diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx index b58704264..3b6d8d690 100644 --- a/src/client/views/Main.tsx +++ b/src/client/views/Main.tsx @@ -66,10 +66,7 @@ document.addEventListener("pointerdown", action(function (e: PointerEvent) { let doc6 = Documents.CollectionDocument(docset2, { x: 350, y: 100, width: 600, height: 600, title: "docking collection" }); - let mainNodes = null;// mainContainer.GetFieldT(KeyStore.Data, ListField); - if (!mainNodes) { - mainNodes = new ListField(); - } + let mainNodes = mainContainer.GetOrCreate>(KeyStore.Data, ListField); // mainNodes.Data.push(doc6); // mainNodes.Data.push(doc2); mainNodes.Data.push(doc4); @@ -78,7 +75,6 @@ document.addEventListener("pointerdown", action(function (e: PointerEvent) { // mainNodes.Data.push(doc1); //mainNodes.Data.push(doc2); mainNodes.Data.push(doc6); - mainContainer.Set(KeyStore.Data, mainNodes); } //} //); -- cgit v1.2.3-70-g09d2