paragraphRange
signature does not specify the returning type could be nullable, leading to unexpected crashes
#1378
Labels
We've seen some crashes in WooCommerce for iOS coming from our AztecEditor wrapper. This seems to come from the underlying usage of
paragraphRange
, since assumes that the attachment passed into the method is the string, force-unwrapping the first result of the attachments array:This leads to unexpected crashes when the method is not used as intended, since its signature does not specify that the result could be nil. Ideally we should change the returning type to
NSRange?
, or handle the existence ofnil
values internally.The text was updated successfully, but these errors were encountered: