Skip to content

Commit

Permalink
fix: removing command from core templates plugin failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzent03 committed Apr 13, 2021
1 parent c4a7cd9 commit 36eeb8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,15 +247,16 @@ class SettingsTab extends PluginSettingTab {
switch (file.plugin) {
case 'core':
this.plugin.settings.files.remove(file.path);
(this.plugin.app as any).commands.removeCommand(`${this.plugin.manifest.id}:${file.path}`);
break;
case 'templater':
this.plugin.settings.templaterFiles.remove(file.path);
(this.plugin.app as any).commands.removeCommand(`${this.plugin.manifest.id}:${file.plugin}:${file.path}`);
break;
default:
console.log(file.path + ' is associated with an unknown plugin');
return;
}
(this.plugin.app as any).commands.removeCommand(`${this.plugin.manifest.id}:${file.plugin}:${file.path}`);
}
this.plugin.saveSettings();
}
Expand Down

0 comments on commit 36eeb8c

Please sign in to comment.