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 await browser close #896

Merged
merged 1 commit into from
Nov 25, 2024
Merged

Fix await browser close #896

merged 1 commit into from
Nov 25, 2024

Conversation

clementmas
Copy link
Contributor

remoteInstance is a boolean while disconnect()and close() return promises.

The default behavior of await remoteInstance ? browser.disconnect() : browser.close() without parenthesis is to await the boolean which will resolve instantly.

Adding parenthesis ensures the promises are "awaited" properly.

@AlexVanderbist
Copy link
Member

Thanks!

@AlexVanderbist AlexVanderbist merged commit 9f52a5b into spatie:main Nov 25, 2024
5 checks passed
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