New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openUrl requires a returned promise, but why? #521
Comments
Hello, This is because some integrations will return a promise, such as Capacitor's Browser.open. Typically, opening a browser is an async operation, but not when using window.location.replace.
An async function that does not return anything will return a This is exactly what is happening in the example you linked, it's an async function not returning anything. |
I meant the example does not need to be an async function since it returns void. By changing the type to
and then the implementation to support that (which might be as simple as |
Thank you all! |
Describe the problem
In version 2.x.x, why does
openUrl
as a function, require a returned promise? The example shows it returningvoid
, which doesn't need to be resolved in a promise.The text was updated successfully, but these errors were encountered: