From b340defb4a4b8c5b7604099e7b0fb5b6846f70aa Mon Sep 17 00:00:00 2001
From: Bob Zeleznik <zzzman@gmail.com>
Date: Sat, 27 Jun 2020 21:06:44 -0400
Subject: fixed safe mode & reverted to apply ontly to freeform and schema
 collections.

---
 src/client/views/collections/CollectionView.tsx | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

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

diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx
index 5e3026979..5f6e8c4a7 100644
--- a/src/client/views/collections/CollectionView.tsx
+++ b/src/client/views/collections/CollectionView.tsx
@@ -105,7 +105,15 @@ export class CollectionView extends Touchable<FieldViewProps & CollectionViewCus
 
     get collectionViewType(): CollectionViewType | undefined {
         const viewField = StrCast(this.props.Document._viewType);
-        return CollectionView._safeMode ? CollectionViewType.Tree : viewField as any as CollectionViewType;
+        if (CollectionView._safeMode) {
+            if (viewField === CollectionViewType.Freeform || viewField === CollectionViewType.Schema) {
+                return CollectionViewType.Tree;
+            }
+            if (viewField === CollectionViewType.Invalid) {
+                return CollectionViewType.Freeform;
+            }
+        }
+        return viewField as any as CollectionViewType;
     }
 
     active = (outsideReaction?: boolean) => (this.props.isSelected(outsideReaction) || this.props.rootSelected(outsideReaction) || this.props.Document.forceActive || this._isChildActive || this.props.renderDepth === 0) ? true : false;
-- 
cgit v1.2.3-70-g09d2

