use matchDeepLink result for relative links (#6882)

This commit is contained in:
Elias Nahum 2022-12-20 11:42:02 +02:00 committed by GitHub
parent a9464c365e
commit b01a5bfab8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -138,7 +138,7 @@ export const handleGotoLocation = async (serverUrl: string, intl: IntlShape, loc
const match = matchDeepLink(location, serverUrl, config?.SiteURL);
if (match) {
handleDeepLink(location, intl, location);
handleDeepLink(match, intl, location);
} else {
const {formatMessage} = intl;
const onError = () => Alert.alert(

View file

@ -76,9 +76,9 @@ const MarkdownLink = ({children, experimentalNormalizeMarkdownLinks, href, siteU
const match = matchDeepLink(url, serverUrl, siteURL);
if (match) {
const {error} = await handleDeepLink(url, intl);
const {error} = await handleDeepLink(match, intl);
if (error) {
tryOpenURL(url, onError);
tryOpenURL(match, onError);
}
} else {
tryOpenURL(url, onError);