We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03c0960 commit 4f39b0dCopy full SHA for 4f39b0d
src/workspace/cache/cache.ts
@@ -20,7 +20,9 @@ const utils = () => require('../../utils');
20
export const cacheRefs = async () => {
21
const { search, getWorkspaceFolder } = utils();
22
23
- const fsPaths = await search('\\[\\[([^\\[\\]]+?)\\]\\]', getWorkspaceFolder()!);
+ const workspaceFolder = getWorkspaceFolder();
24
+
25
+ const fsPaths = workspaceFolder ? await search('\\[\\[([^\\[\\]]+?)\\]\\]', workspaceFolder) : [];
26
27
const searchUris = fsPaths.length
28
? workspaceCache.markdownUris.filter(({ fsPath }) => fsPaths.includes(fsPath))
0 commit comments