NovuN
Novuβ€’5mo agoβ€’
3 replies
hydrandt

React: Cannot read properties of undefined (reading 'split')

Hi,
I'm playing with self hosted novu (docker compose) in a react app. Every time I send a notification and then try to open the inbox component, there is a crash:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'split')
    at index.mjs:968:38
    at DefaultNotification.createRenderEffect.e [as fn] (index.mjs:7880:17)


The crash is because the key property here is undefined:

  const styleFuncMemo = createMemo(
    () => ({
      key,
      className,
      iconKey,
      context
    }) => {
      const appearanceKeyParts = key.split("__");
...


Anyone has an idea what is causing this? When I connected to the SAAS version of Novu, I didn't have this problem.

All my docker images are with version
2.3.0
, and
"@novu/react": "^3.10.1
. Happy to debug together!:)
Was this page helpful?