Skip to content

Commit afc6d8e

Browse files
authored
fix(vscode): ensure nearestParentDartFrogProject is Windows compatible (#1064)
1 parent f25a39f commit afc6d8e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

extensions/vscode/src/utils/dart-frog-project.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ export function normalizeRoutePath(
7373
export function nearestParentDartFrogProject(
7474
filePath: string
7575
): string | undefined {
76+
const root = path.parse(filePath).root;
77+
7678
let currentPath = filePath;
77-
while (currentPath !== path.sep) {
79+
while (currentPath !== root) {
7880
if (isDartFrogProject(currentPath)) {
7981
return currentPath;
8082
}

0 commit comments

Comments
 (0)