Skip to content

Commit

Permalink
fix: 🐛 Rename userHierarchies to userHiers
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Nov 22, 2021
1 parent 16445ed commit a0cbebb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export interface BCSettings {
trailSeperator: string;
useAllMetadata: boolean;
userHiers: UserHier[];
userHierarchies: UserHier[];
visGraph: visTypes;
visRelation: Relations;
visClosed: string;
Expand Down
6 changes: 6 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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] = [];
Expand Down

0 comments on commit a0cbebb

Please sign in to comment.