You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ios): remove potential division by zero minute interval (#997)
* fix: prevent division by zero crash in adjustMinimumDate when minuteInterval is 0
- Add safety check in adjustMinimumDate function to handle minuteInterval <= 0
- Return minimumDate unchanged when no valid interval is provided
- Add debug logging to track minuteInterval values for troubleshooting
- Fixes EXC_ARITHMETIC (EXC_I386_DIV) crash when modulo operation encounters zero divisor
This fixes crashes that occur when DateTimePicker is used without explicitly setting minuteInterval,
as the default value becomes 0 instead of the expected 1, causing division by zero in the modulo operation.
* refactor: reduce logging in adjustMinimumDate
Only log when minuteInterval <= 0 and we return date unchanged.
Remove verbose logging for normal operation to reduce console noise.
* Update RNDateTimePickerComponentView.mm
* Update ios/fabric/RNDateTimePickerComponentView.mm
---------
Co-authored-by: Vojtech Novak <[email protected]>
0 commit comments