react-simple-maps types declare path as always non-null, but it is undefined during the initial render before the MapProvider context has fully initialised. Guard with an early return after all hooks have been called, casting through unknown to reflect the true runtime type without triggering the @typescript-eslint/no-unnecessary-condition rule.
7.1 KiB
7.1 KiB