Skip to content

Conversation

ckknight
Copy link
Contributor

Summary:

This fixes a NSInvalidArgumentException which causes a full app crash when <Slider accessibilityIncrements={['anything non-empty array']} /> is rendered, by initializing an NSMutableArray instead of an NSArray, as it called with addObject: if accessibilityIncrements is non-empty.

Test Plan:

In iOS,

Render <Slider minimumValue={1} maximumValue={3} accessibilityIncrements={['alfa', 'bravo', 'charlie']} />

See if it crashes or not


Android should have no behavioral differences.

This fixes a NSInvalidArgumentException which causes a full app crash when `<Slider accessibilityIncrements={['anything non-empty array']} />` is rendered, by initializing an NSMutableArray instead of an NSArray, as it called with `addObject:` if `accessibilityIncrements` is non-empty.
@BartoszKlonowski BartoszKlonowski self-requested a review February 14, 2025 11:52
Copy link
Member

@BartoszKlonowski BartoszKlonowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this, @ckknight! 👍

@BartoszKlonowski BartoszKlonowski merged commit 0cb2234 into callstack:main Feb 14, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants