Regression: Markdown handlePress not working properly (#3278)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
d1702aa416
commit
d1f35bb799
|
@ -7,15 +7,19 @@ import { themes } from '../../constants/colors';
|
|||
import { LISTENER } from '../Toast';
|
||||
import EventEmitter from '../../utils/events';
|
||||
import I18n from '../../i18n';
|
||||
import openLink from '../../utils/openLink';
|
||||
|
||||
const Link = React.memo(({
|
||||
children, link, theme, onLinkPress
|
||||
}) => {
|
||||
const handlePress = () => {
|
||||
if (!link || !onLinkPress) {
|
||||
if (!link) {
|
||||
return;
|
||||
}
|
||||
onLinkPress(link);
|
||||
if (onLinkPress) {
|
||||
return onLinkPress(link);
|
||||
}
|
||||
openLink(link, theme);
|
||||
};
|
||||
|
||||
const childLength = React.Children.toArray(children).filter(o => o).length;
|
||||
|
|
Loading…
Reference in New Issue