Skip to content

Commit

Permalink
fix: Open browser button on windows (#1670)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skye-31 authored Aug 12, 2022
1 parent ac39748 commit 1b232aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/khaki-ants-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

fix: dev.tsx opens 127.0.0.1 instead of 0.0.0.0 (doesn't work on windows)
4 changes: 4 additions & 0 deletions packages/wrangler/src/dev/dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,10 @@ function useHotkeys(props: {
break;
// open browser
case "b": {
if (ip === "0.0.0.0") {
await openInBrowser(`${localProtocol}://127.0.0.1:${port}`);
return;
}
await openInBrowser(`${localProtocol}://${ip}:${port}`);
break;
}
Expand Down

0 comments on commit 1b232aa

Please sign in to comment.