From 42b2b6745b89b40a4f64639db6fffac4bbd0b6f4 Mon Sep 17 00:00:00 2001 From: Ross Keenan Date: Sun, 17 Apr 2022 16:30:11 +0200 Subject: [PATCH] fix(Path View): :bug: Toggle Trail in Live Preview Mode command wasn't using the latest value to toggle the setting (#364) --- src/main.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.ts b/src/main.ts index a2a471a5..1a968d4c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -233,7 +233,7 @@ export default class BCPlugin extends Plugin { id: "Toggle-trail-in-Edit&LP", name: "Toggle: Show Trail/Grid in Edit & LP mode", callback: async () => { - settings.showBCsInEditLPMode = !showBCsInEditLPMode; + settings.showBCsInEditLPMode = !settings.showBCsInEditLPMode; await this.saveSettings(); await drawTrail(this); }, @@ -318,11 +318,11 @@ export default class BCPlugin extends Plugin { } loadSettings = async () => - (this.settings = Object.assign( - {}, - DEFAULT_SETTINGS, - await this.loadData() - )); + (this.settings = Object.assign( + {}, + DEFAULT_SETTINGS, + await this.loadData() + )); saveSettings = async () => await this.saveData(this.settings);