mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-04 21:23:07 +00:00
Merge pull request #232 from leonvanzyl/main
fix: Open in Browser button not working on Windows
This commit is contained in:
@@ -114,13 +114,12 @@ export function useDevServers({ projectPath }: UseDevServersOptions) {
|
|||||||
|
|
||||||
const handleOpenDevServerUrl = useCallback(
|
const handleOpenDevServerUrl = useCallback(
|
||||||
(worktree: WorktreeInfo) => {
|
(worktree: WorktreeInfo) => {
|
||||||
const targetPath = worktree.isMain ? projectPath : worktree.path;
|
const serverInfo = runningDevServers.get(getWorktreeKey(worktree));
|
||||||
const serverInfo = runningDevServers.get(targetPath);
|
|
||||||
if (serverInfo) {
|
if (serverInfo) {
|
||||||
window.open(serverInfo.url, '_blank');
|
window.open(serverInfo.url, '_blank');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[projectPath, runningDevServers]
|
[runningDevServers, getWorktreeKey]
|
||||||
);
|
);
|
||||||
|
|
||||||
const isDevServerRunning = useCallback(
|
const isDevServerRunning = useCallback(
|
||||||
|
|||||||
Reference in New Issue
Block a user