Skip to content

Commit e7bddd2

Browse files
committed
fix: get all resources
1 parent a5f3d5d commit e7bddd2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/fileStore/file-store.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@ export class FileStore {
198198
const pattern = fileMap.pathTemplate.replace('{teamId}', '').replace('{name}.yaml', '')
199199
const [beforeTeam, afterTeam] = pattern.split('//')
200200
for (const filePath of this.store.keys()) {
201-
if (filePath.startsWith(beforeTeam) && filePath.includes(afterTeam) && filePath.endsWith('.yaml')) {
201+
const matchesPattern = afterTeam
202+
? filePath.startsWith(beforeTeam) && filePath.includes(afterTeam) && filePath.endsWith('.yaml')
203+
: filePath.startsWith(beforeTeam) && filePath.endsWith('.yaml')
204+
if (matchesPattern) {
202205
const content = this.store.get(filePath)
203206
if (content) result.set(filePath, content)
204207
}

0 commit comments

Comments
 (0)