Skip to content

Commit

Permalink
perf(getFieldValues): ⚡ First check if the note even has that field!
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Aug 26, 2021
1 parent c6e3d95 commit 9be84c9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/sharedFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ export function getFieldValues(
const values: string[] = [];
try {
const rawValuesPreFlat = frontmatterCache?.[field];
if (!rawValuesPreFlat) return [];
if (typeof rawValuesPreFlat === "string") {
const splits = rawValuesPreFlat.match(splitLinksRegex);
if (splits !== null) {
Expand Down

0 comments on commit 9be84c9

Please sign in to comment.