Tooltip: Crashes when position
prop is undefined
#6648
Labels
Type: Bug
Issue contains a defect related to a specific component.
Milestone
Describe the bug
Instantiating a Tooltip with
position={undefined}
results in the following error:Uncaught TypeError: Cannot read properties of undefined (reading 'my')
Despite being permitted by the
TooltipOptions
type declaration:position?: 'top' | 'bottom' | 'left' | 'right' | 'mouse' | undefined;
Reproducer
https://stackblitz.com/edit/vitejs-vite-phqpg8?file=src%2FApp.tsx
PrimeReact version
10.6.5
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
No crash.
Position set to default value 'right'
The text was updated successfully, but these errors were encountered: