Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash - ERROR [TypeError: imageProp.includes is not a function (it is undefined)] #2816

Open
Saad-Bashar opened this issue Nov 27, 2024 · 0 comments

Comments

@Saad-Bashar
Copy link

Saad-Bashar commented Nov 27, 2024

Whenever I get a new message from another user the <Channel /> component crashes. It crashes on the Avatar component from stream chat RN components. The is where it exactly crashes getResizedImageUrl,

uri:
    !imageProp ||
    imageProp.includes(randomImageBaseUrl) ||
    imageProp.includes(randomSvgBaseUrl)
      ? imageProp?.includes(streamCDN)
        ? imageProp
        : `${randomImageBaseUrl}${
            name ? `?name=${getInitials(name)}&size=${size}` : ''
          }`
      : getResizedImageUrl({
          height: size,
          url: imageProp, //  ---------- IT CRASHES ON THIS LINE, imageProp.includes is not a function  ---------
          width: size,
        }),

Please note that all my users are not connected with avatar. Some users may have avatar, some users don't have any avatar. How can we fix this issue? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant