File Obtain Method Correction

This commit is contained in:
Ozan Tellioglu 2023-03-12 13:11:41 +01:00
parent 959cfe3f7b
commit 54241bbee2

View file

@ -36,7 +36,7 @@ export default function NoteListComponent(params: NoteListComponentParams) {
};
const openFilePath = (filePath: string) => {
let abstractFile = plugin.app.metadataCache.getFirstLinkpathDest(filePath, '');
let abstractFile = plugin.app.vault.getAbstractFileByPath(filePath);
if (abstractFile) {
openFile({
file: abstractFile as TFile,