From f171030e83d305923129ad7954b52d3d99c9ed5e Mon Sep 17 00:00:00 2001 From: chris <kokosias@yahoo.gr> Date: Sat, 28 Jan 2023 08:46:07 +0200 Subject: [PATCH] read only fix --- .../MatchingService/components/MatchingContainerComponent.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wax-prosemirror-services/src/MatchingService/components/MatchingContainerComponent.js b/wax-prosemirror-services/src/MatchingService/components/MatchingContainerComponent.js index 8fe2c2cee..4d5afc9cd 100644 --- a/wax-prosemirror-services/src/MatchingService/components/MatchingContainerComponent.js +++ b/wax-prosemirror-services/src/MatchingService/components/MatchingContainerComponent.js @@ -228,13 +228,13 @@ export default ({ node, view, getPos }) => { }; options.forEach(option => { - if (getRef(option.value).current) + if (getRef(option.value) && getRef(option.value).current) getRef(option.value).current.addEventListener('keydown', listener); }); return () => { options.forEach(option => { - if (getRef(option.value).current) + if (getRef(option.value) && getRef(option.value).current) getRef(option.value).current.removeEventListener('keydown', listener); }); }; -- GitLab