From 8a53195016c0210878025751434e83c712dd2ae0 Mon Sep 17 00:00:00 2001 From: Ross Keenan Date: Wed, 29 Dec 2021 10:03:45 +0200 Subject: [PATCH] fix(WriteBCToFile): :bug: Use fallback field if needed --- src/main.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index bf59dd22..f62fba64 100644 --- a/src/main.ts +++ b/src/main.ts @@ -427,8 +427,6 @@ export default class BCPlugin extends Plugin { () => new VisModal(this.app, this).open() ); - this.statusBatItemEl = this.addStatusBarItem(); - this.addSettingTab(new BCSettingTab(this.app, this)); } @@ -445,7 +443,8 @@ export default class BCPlugin extends Plugin { } const succInfo = mainG.mapInEdges(file.basename, (k, a, s, t) => { - const oppField = getOppFields(userHiers, a.field)[0]; + const oppField = + getOppFields(userHiers, a.field)[0] ?? fallbackOppField(a.field, a.dir); return { succ: s, field: oppField }; });