Skip to content

Commit 99f3416

Browse files
committed
fix #224
1 parent ac3cb4f commit 99f3416

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Obsidian Meta Bind Changelog
22

3+
# 0.12.5
4+
5+
Bug Fixes
6+
7+
- Fixed an issue with the Button Builder throwing an error when closed [#224](https://github.com/mProjectsCode/obsidian-meta-bind-plugin/issues/224)
8+
39
# 0.12.4
410

511
Bug Fixes

src/fields/button/ButtonBuilderModalComponent.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@
2424
export let buttonConfig: ButtonConfig;
2525
2626
let buttonEl: HTMLElement;
27-
let buttonMDRC: ButtonBase;
27+
let buttonBase: ButtonBase;
2828
let addActionType: ButtonActionType;
2929
3030
$: updatePreviewButton(buttonConfig, buttonEl);
3131
3232
onDestroy(() => {
33-
buttonMDRC?.unload();
33+
buttonBase?.unmount();
3434
});
3535
3636
function updatePreviewButton(config: ButtonConfig, el: HTMLElement) {
37-
buttonMDRC?.unmount();
37+
buttonBase?.unmount();
3838
if (el) {
3939
el.empty();
40-
buttonMDRC = new ButtonBase(modal.plugin, getUUID(), '', stringifyYaml(config), true);
41-
buttonMDRC.mount(el);
40+
buttonBase = new ButtonBase(modal.plugin, getUUID(), '', stringifyYaml(config), true);
41+
buttonBase.mount(el);
4242
}
4343
}
4444

0 commit comments

Comments
 (0)