Skip to content

Commit fb85ed0

Browse files
committed
Fix issue with open in vscode
1 parent cd53418 commit fb85ed0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "remix-development-tools",
33
"description": "Remix development tools - a set of tools for developing/debugging Remix.run apps",
44
"author": "Alem Tuzlak",
5-
"version": "4.5.1",
5+
"version": "4.5.2",
66
"license": "MIT",
77
"keywords": [
88
"remix",

src/vite/plugin.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ export const remixDevTools: (args?:RemixViteConfig) => Plugin[] = (args) => {
9696

9797
if (!server.config.isProduction) {
9898
const { exec } = await import("node:child_process");
99-
const openInVsCode = (path: string, lineNum: string) => {
99+
const openInVsCode = (path: string | undefined, lineNum: string) => {
100+
if(!path){
101+
return;
102+
}
100103
exec(`code -g "${normalizePath(path)}${lineNum}"`);
101104
}
102105

@@ -140,7 +143,7 @@ export const remixDevTools: (args?:RemixViteConfig) => Plugin[] = (args) => {
140143
routeFile && openInVsCode(path.join(remixDir, routeID, routeFile), lineNum);
141144
return;
142145
}
143-
return openInVsCode(path.join(validPath), lineNum);
146+
return openInVsCode(validPath, lineNum);
144147
}
145148
});
146149
}

0 commit comments

Comments
 (0)