From 9afcb0f8ab12bd94494b7a5b532dbe26835382ac Mon Sep 17 00:00:00 2001
From: Bob Zeleznik <zzzman@gmail.com>
Date: Sat, 19 Oct 2019 14:55:46 -0400
Subject: need to find a better way to unset a ChildLayout on a collection

---
 src/client/views/collections/CollectionSubView.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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

diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx
index bc61492d0..f76447157 100644
--- a/src/client/views/collections/CollectionSubView.tsx
+++ b/src/client/views/collections/CollectionSubView.tsx
@@ -62,9 +62,10 @@ export function CollectionSubView<T>(schemaCtor: (doc: Doc) => T) {
                 async (args) => {
                     if (args[1] instanceof Doc) {
                         this.childDocs.map(async doc => !Doc.AreProtosEqual(args[1] as Doc, (await doc).layout as Doc) && Doc.ApplyTemplateTo(args[1] as Doc, (await doc)));
-                    } else {
-                        this.childDocs.filter(d => !d.isTemplateField).map(async doc => doc.layout = undefined);
                     }
+                    // else if (!(args[1] instanceof Promise)) {
+                    //     this.childDocs.filter(d => !d.isTemplateField).map(async doc => doc.layout = undefined);
+                    // }
                 });
 
         }
-- 
cgit v1.2.3-70-g09d2

