From 49310acbdfd7ca239c939208b3766c54e980f6f1 Mon Sep 17 00:00:00 2001
From: ab <abdullah_ahmed@brown.edu>
Date: Sat, 6 Apr 2019 18:43:15 -0400
Subject: drop fraught but technically undoable

---
 src/client/util/TooltipTextMenu.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/client/util/TooltipTextMenu.tsx')

diff --git a/src/client/util/TooltipTextMenu.tsx b/src/client/util/TooltipTextMenu.tsx
index 2a613ba8b..3a6eadac0 100644
--- a/src/client/util/TooltipTextMenu.tsx
+++ b/src/client/util/TooltipTextMenu.tsx
@@ -49,7 +49,7 @@ export class TooltipTextMenu {
       e.preventDefault();
       view.focus();
       items.forEach(({ command, dom }) => {
-        if (dom.contains(e.srcElement)) {
+        if (e.srcElement && dom.contains(e.srcElement as Node)) {
           let active = command(view.state, view.dispatch, view);
           //uncomment this if we want the bullet button to disappear if current selection is bulleted
           // dom.style.display = active ? "" : "none"
-- 
cgit v1.2.3-70-g09d2

