Closed jamiees2 closed 2 months ago
@jamiees2 This looks okay once the linting error is resolved. I'll let @RichardLindhout be responsible for merging it after he takes a look.
@jamiees2 Can you resolve the merge conflict? Then I'll go ahead and merge it.
Done :)
https://github.com/web-ridge/react-native-paper-dates/commit/e9d69556b50cdf5df70c6df440818d6b3454e387 introduced a bug where if the app is using a Material V2 dark theme, the time picker will access a color property which isn't defined, resulting in a hard crash with a "Cannot read property 'level3' of undefined".
This is due to the previous logic gating on
theme.isV3
before accessing the property, while the current logic does not gate on this.This PR changes the logic to be similar to the change to Day.tsx, which does check if the theme is V3 before accessing potentially undefined properties.
We have deployed this change to our app, and it has fixed the crashes our users were seeing.