Skip to content

Commit 07241f5

Browse files
authored
chore: changeset (#488)
1 parent eb4e4f8 commit 07241f5

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

.changeset/afraid-seals-sparkle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"lingo.dev": patch
3+
---
4+
5+
init command fix

packages/cli/src/cli/utils/find-locale-paths.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ function findLocaleFilesWithExtension(ext: string) {
4242

4343
const potantialLocaleFilesAndPatterns = potentialLocaleFiles
4444
.map((file: string) => {
45-
const matchPotentialLocales = file
46-
.matchAll(new RegExp(`\/([a-z]{2}(-[A-Z]{2})?|[^\/]+)(?=\/|${ext})`, "g"))
47-
.toArray();
45+
const matchPotentialLocales = Array.from(
46+
file.matchAll(new RegExp(`\/([a-z]{2}(-[A-Z]{2})?|[^\/]+)(?=\/|${ext})`, "g")),
47+
);
4848
const potantialLocales = matchPotentialLocales.map((match) => match[1]);
4949
return { file, potantialLocales };
5050
})

0 commit comments

Comments
 (0)