Skip to content

Commit

Permalink
fix(Codeblock): 🐛 Check if f is undefined first (fix #265)
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Jan 11, 2022
1 parent ffe54cb commit d530454
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,7 @@ export default class BCPlugin extends Plugin {

const allFields = getFields(userHiers);
[fields].flat()?.forEach((f) => {
if (!allFields.includes(f))
err += `<code>field: ${f}</code> is not a field in your hierarchies.</br>`;
if (f !== undefined && !allFields.includes(f))
});

if (title !== undefined && title !== "false")
Expand Down

0 comments on commit d530454

Please sign in to comment.