-
Notifications
You must be signed in to change notification settings - Fork 2
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(windows): Chrome folder is shown when no starting URL is provided #388
Conversation
src/browser.ts
Outdated
@@ -70,7 +70,7 @@ export const launchBrowser = async ( | |||
`--proxy-server=http://localhost:${appSettings.proxy.port}`, | |||
`--ignore-certificate-errors-spki-list=${certificateSPKI}`, | |||
disableChromeOptimizations, | |||
url ?? '', | |||
url ?? 'about:blank', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still able to reproduce the issue on Windows. My guess url
is an empty string and doesn't trigger nullish operator fallback, the ||
operator should do the trick.
You can also verify this on macos: about:blank should open as an empty page, currently it opens to chrome homepage with google search.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth to also to url.trim()
to handle the user entering a bunch of spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I didn't even notice this on MacOS 🤦♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Description
On Windows, if the user doesn't provide a URL before starting a recording, the browser shows the Chrome folder.
How to Test
On a windows machine:
Start recording
while leaving theStarting URL
blank