From 7696d85b7b737a29cab189f4c65f395c5de132c7 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Tue, 13 Sep 2022 10:11:06 -0400
Subject: fixed problem with sharing presentations where preselementbox
 template couldn't be expanded.

---
 src/client/views/nodes/trails/PresElementBox.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/client/views/nodes/trails/PresElementBox.tsx')

diff --git a/src/client/views/nodes/trails/PresElementBox.tsx b/src/client/views/nodes/trails/PresElementBox.tsx
index 1a2054676..bd5e8caab 100644
--- a/src/client/views/nodes/trails/PresElementBox.tsx
+++ b/src/client/views/nodes/trails/PresElementBox.tsx
@@ -219,8 +219,10 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
         const dragItem: HTMLElement[] = [];
         if (dragArray.length === 1) {
             const doc = this._itemRef.current || dragArray[0];
-            doc.className = miniView ? 'presItem-miniSlide' : 'presItem-slide';
-            dragItem.push(doc);
+            if (doc) {
+                doc.className = miniView ? 'presItem-miniSlide' : 'presItem-slide';
+                dragItem.push(doc);
+            }
         } else if (dragArray.length >= 1) {
             const doc = document.createElement('div');
             doc.className = 'presItem-multiDrag';
-- 
cgit v1.2.3-70-g09d2

