Skip to content
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

fix: missing await on promise #47

Closed
wants to merge 1 commit into from
Closed

Conversation

DanielRivers
Copy link
Contributor

Explain your changes

Missing await on promises on getPermissions.

Checklist

🛟 If you need help, consider asking for advice over in the Kinde community.

@coel
Copy link
Member

coel commented Mar 4, 2024

@DanielRivers, I think awaiting on the two promises makes the Promise.all redundant? What problem manifests with the original code?

I do note in the original code the coalescing on the promise probably doesn't do very much, possibly the return should be specified as permissions: permissions ?? [],.

@DanielRivers
Copy link
Contributor Author

@DanielRivers, I think awaiting on the two promises makes the Promise.all redundant? What problem manifests with the original code?

I do note in the original code the coalescing on the promise probably doesn't do very much, possibly the return should be specified as permissions: permissions ?? [],.

Ah, I missed the Promise.all, I added some tests which were not covering certain flows and this method wasn't returning as expected. I will double check the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants