Skip to content

Incorrect usage of canOpenUrl? #16

@raffij

Description

@raffij

I believe Linking.canOpenUrl returns a promise rather than a boolean so this will never work?
https://github.com/joshswan/react-native-autolink/blob/master/src/index.js#L62

Looks like the logic for fallbacks needs to be moved to the onPress function. Either by getURL passing an array of urls if there's a fallback, or a getFallback function such as in this fork?

https://github.com/conversocial/react-native-autolink/blob/master/src/index.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions