Skip to content
Snippets Groups Projects
Commit f171030e authored by chris's avatar chris
Browse files

read only fix

parent b8b5675e
No related branches found
No related tags found
No related merge requests found
......@@ -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);
});
};
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment