From 9726f2b749f42976cda29ec4a17eec0947202102 Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Wed, 23 Jun 2021 07:26:47 +0300
Subject: [PATCH] add missing id

---
 .../demo/src/Editoria/layout/EditoriaMobileLayout.js  |  2 +-
 wax-prosemirror-services/src/NoteService/Editor.js    | 11 +++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/editors/demo/src/Editoria/layout/EditoriaMobileLayout.js b/editors/demo/src/Editoria/layout/EditoriaMobileLayout.js
index c2df40828..b0fd63c35 100644
--- a/editors/demo/src/Editoria/layout/EditoriaMobileLayout.js
+++ b/editors/demo/src/Editoria/layout/EditoriaMobileLayout.js
@@ -202,7 +202,7 @@ const EditoriaLayout = ({ editor }) => {
 
   return (
     <ThemeProvider theme={cokoTheme}>
-      <Wrapper>
+      <Wrapper id="wax-container">
         <TopMenu>
           <TopBar />
         </TopMenu>
diff --git a/wax-prosemirror-services/src/NoteService/Editor.js b/wax-prosemirror-services/src/NoteService/Editor.js
index e0f812867..a823668eb 100644
--- a/wax-prosemirror-services/src/NoteService/Editor.js
+++ b/wax-prosemirror-services/src/NoteService/Editor.js
@@ -116,10 +116,13 @@ export default ({ node, view }) => {
     }, 20);
 
     const findReplace = context.app.PmPlugins.get('findAndReplacePlugin');
-    const matches = findReplace.getState(noteView.state).allMatches;
-    if (matches.length > 0 && !typing && context.activeViewId === noteId)
-      context.updateView({}, noteId);
-    // UNTIL HERE
+
+    if (findReplace) {
+      const matches = findReplace.getState(noteView.state).allMatches;
+      if (matches.length > 0 && !typing && context.activeViewId === noteId)
+        context.updateView({}, noteId);
+      // UNTIL HERE
+    }
 
     if (!tr.getMeta('fromOutside')) {
       const outerTr = view.state.tr;
-- 
GitLab