From f8d37ace0c528e92e2dbd10908eb684b623974cf Mon Sep 17 00:00:00 2001 From: valentine195 <38669521+valentine195@users.noreply.github.com> Date: Tue, 29 Mar 2022 08:59:23 -0400 Subject: [PATCH] fix: Fixes issue where a type couldn't be renamed --- src/settings.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/settings.ts b/src/settings.ts index 336c62c..b96a8a4 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -803,9 +803,6 @@ export default class AdmonitionSetting extends PluginSettingTab { modalAdmonition.type != admonition.type ) { this.plugin.unregisterType(admonition); - this.plugin.registerType( - modalAdmonition.type - ); const existing: [string, Admonition][] = Object.entries( @@ -832,6 +829,10 @@ export default class AdmonitionSetting extends PluginSettingTab { ] = modalAdmonition; } + this.plugin.registerType( + modalAdmonition.type + ); + this.plugin.calloutManager.addAdmonition( modalAdmonition );