Skip to content

Commit

Permalink
fix(vscode): ensure nearestParentDartFrogProject is Windows compatible (
Browse files Browse the repository at this point in the history
  • Loading branch information
alestiago authored Sep 20, 2023
1 parent f25a39f commit afc6d8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extensions/vscode/src/utils/dart-frog-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ export function normalizeRoutePath(
export function nearestParentDartFrogProject(
filePath: string
): string | undefined {
const root = path.parse(filePath).root;

let currentPath = filePath;
while (currentPath !== path.sep) {
while (currentPath !== root) {
if (isDartFrogProject(currentPath)) {
return currentPath;
}
Expand Down

0 comments on commit afc6d8e

Please sign in to comment.