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

Help: TypeError in is.equ #3203

Open
ChouchouCendre opened this issue Mar 11, 2024 · 4 comments
Open

Help: TypeError in is.equ #3203

ChouchouCendre opened this issue Mar 11, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@ChouchouCendre
Copy link

In a big custom React project with SSR, I have a weird bug upgrading from 8.15.1 to 8.15.2:
v8.15.1...v8.15.2

TypeError: Cannot use 'in' operator to search for

It seems the error occurs when the function is.equ in index-e6b5343a.esm.js is trying to compare two booleans.
If I add these following lines in the file (before the comment '// Last resort'), the error vanishes:

// If boolean
    if (a === b) {
      return true;
    }
  1. Do you know where this error might come from?
  2. Is it possible to add this condition in the next release?
@CodyJasonBennett CodyJasonBennett added the bug Something isn't working label Mar 11, 2024
@CodyJasonBennett
Copy link
Member

Can you provide a stack trace against that version or live reproduction?

@ChouchouCendre
Copy link
Author

@CodyJasonBennett, here it is:
react-fiber

@CodyJasonBennett
Copy link
Member

This comes from configuring the R3F Canvas. Which props are you configuring here? It's very hard and basically guesswork without a reproduction, but with the severity of this I'm okay starting from a stacktrace.

@ChouchouCendre
Copy link
Author

These are the props:

<Canvas frameloop={stateActive ? 'always' : 'never'} className="aClassName" resize={{ debounce: 0 }} ref={ref}>
{children}
</Canvas>

But even without these props, the error occurs anyway... It happens only if the component is updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants