We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9124ba commit c3d33d8Copy full SHA for c3d33d8
1 file changed
src/fileService.ts
@@ -37,14 +37,14 @@ class VaultFileService implements VaultFileService {
37
if (file instanceof TFile) {
38
return await this.vault.cachedRead(file);
39
}
40
- return Promise.reject("not a TFile");
+ return Promise.reject(new Error("not a TFile"));
41
42
43
async updateFile(file: IFile, data: string): Promise<void> {
44
45
await this.vault.modify(file, data);
46
47
48
49
50
async checkExists(filepath: string): Promise<boolean> {
0 commit comments