Skip to content

Commit 458b251

Browse files
committed
fix error
1 parent eb37b4d commit 458b251

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jsEngine/api/QueryAPI.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ export class QueryAPI {
9595
const files = this.apiInstance.app.vault.getMarkdownFiles();
9696

9797
return files
98-
.map(file => {
99-
const metadata = this.apiInstance.app.metadataCache.getFileCache(file);
98+
.map(f => {
99+
const metadata = this.apiInstance.app.metadataCache.getFileCache(f);
100100
if (!metadata) {
101101
return undefined;
102102
}
@@ -105,12 +105,12 @@ export class QueryAPI {
105105

106106
if (
107107
links.some(link => {
108-
const linkFile = this.apiInstance.app.metadataCache.getFirstLinkpathDest(link.link, file.path);
108+
const linkFile = this.apiInstance.app.metadataCache.getFirstLinkpathDest(link.link, f.path);
109109
return linkFile?.path === file.path;
110110
})
111111
) {
112112
return {
113-
file: file,
113+
file: f,
114114
cache: metadata,
115115
tags: getAllTags(metadata) ?? [],
116116
frontmatterTags: (metadata?.frontmatter?.tags as string[] | undefined) ?? [],

0 commit comments

Comments
 (0)