react-three-fiber icon indicating copy to clipboard operation
react-three-fiber copied to clipboard

Help: TypeError in is.equ

Open ChouchouCendre opened this issue 1 year ago • 4 comments
trafficstars

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;
    }
  1. Do you know where this error might come from?
  2. Is it possible to add this condition in the next release?

ChouchouCendre avatar Mar 11 '24 08:03 ChouchouCendre

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

CodyJasonBennett avatar Mar 15 '24 19:03 CodyJasonBennett

@CodyJasonBennett, here it is: react-fiber

ChouchouCendre avatar Mar 18 '24 13:03 ChouchouCendre

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.

CodyJasonBennett avatar Mar 25 '24 03:03 CodyJasonBennett

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.

ChouchouCendre avatar Mar 25 '24 09:03 ChouchouCendre