Open JohnFScha opened 2 months ago
I'm having the same issue with my code.
Added a PR to adress this. Some null / undefined guards should already seal the deal here.
For me this errors appears when i change maxLength={x}
and x is bigger then number of InputOTPSlot ;)
Describe the bug
Namely this line ⬇️
Gives the following ts error on each property destructured:
I solved it by marking it as existant (
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index]!
), but I gues that's cheating ts in some sense, so I figured I'd report it just in case.It happened for me when I tried to build my turborepo, which is a private repo of my organization. I'll put the logs down just in case.
Affected component/components
input-otp
How to reproduce
Just install it and go to the ui/ folder open the input-otp.tsx and the type error should arise.
Codesandbox/StackBlitz link
https://github.com/JohnFScha/monorepoFlexy
Logs
System Info
Before submitting