react-three-fiber
react-three-fiber copied to clipboard
Help: TypeError in is.equ
In a big custom React project with SSR, I have a weird bug upgrading from 8.15.1 to 8.15.2: https://github.com/pmndrs/react-three-fiber/compare/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;
}
- Do you know where this error might come from?
- Is it possible to add this condition in the next release?
Can you provide a stack trace against that version or live reproduction?
@CodyJasonBennett, here it is:
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.
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.