From a0cbebbfe6d2d0660c65c238d76f18fa40a3d454 Mon Sep 17 00:00:00 2001 From: Ross Keenan Date: Mon, 22 Nov 2021 11:01:28 +0200 Subject: [PATCH] fix: :bug: Rename userHierarchies to userHiers --- main.js | 4 ++++ src/interfaces.ts | 1 + src/main.ts | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/main.js b/main.js index b8fca223..7f0f794c 100644 --- a/main.js +++ b/main.js @@ -36167,6 +36167,10 @@ class BCPlugin extends obsidian.Plugin { console.log("loading breadcrumbs plugin"); await this.loadSettings(); // Prevent breaking change + if (this.settings.userHierarchies) { + this.settings.userHiers = this.settings.userHierarchies; + delete this.settings.userHierarchies; + } ["prev", "next"].forEach((dir) => { this.settings.userHiers.forEach(async (hier, i) => { if (hier[dir] === undefined) diff --git a/src/interfaces.ts b/src/interfaces.ts index 8e2a50a5..da924e80 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -42,6 +42,7 @@ export interface BCSettings { trailSeperator: string; useAllMetadata: boolean; userHiers: UserHier[]; + userHierarchies: UserHier[]; visGraph: visTypes; visRelation: Relations; visClosed: string; diff --git a/src/main.ts b/src/main.ts index 5c671230..dcf96150 100644 --- a/src/main.ts +++ b/src/main.ts @@ -118,6 +118,12 @@ export default class BCPlugin extends Plugin { await this.loadSettings(); // Prevent breaking change + + if (this.settings.userHierarchies) { + this.settings.userHiers = this.settings.userHierarchies; + delete this.settings.userHierarchies; + } + ["prev", "next"].forEach((dir) => { this.settings.userHiers.forEach(async (hier, i) => { if (hier[dir] === undefined) this.settings.userHiers[i][dir] = [];