We are using RichTextEditor with react version 17.0.2 it is working fine, but when we update react version to the latest (18.1.0), the RTE stopped work and it is throwing an error:
Uncaught TypeError: Cannot read properties of undefined (reading 'hasOwnProperty')
at Observer.notExist (observer.js:175:1)
at Observer.on (observer.js:25:1)
at RichTextEditorComponent.Component.on (component.js:231:1)
at ToolbarRenderer.wireEvent (toolbar-renderer.js:28:1)
at new ToolbarRenderer (toolbar-renderer.js:25:1)
at new Toolbar (toolbar.js:26:1)
at createInstance (util.js:25:1)
at ModuleLoader.inject (module-loader.js:33:1)
at RichTextEditorComponent.Component.injectModules (component.js:332:1)
at RichTextEditorComponent.Component.dataBind (component.js:216:1)
I was able to reproduce it in StackBlitz I've shared the project here: https://stackblitz.com/edit/react-ts-cuihbh?file=App.tsx
Is there any required configuration to run it properly?