Skip to content

Commit c003483

Browse files
committed
fix #235
1 parent 5e03062 commit c003483

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

packages/core/src/fields/button/ButtonActionRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export class ButtonActionRunner {
7272
} else if (type === ButtonActionType.OPEN) {
7373
return { type: ButtonActionType.OPEN, link: '' } satisfies OpenButtonAction;
7474
} else if (type === ButtonActionType.JS) {
75-
return { type: ButtonActionType.JS, file: '' } satisfies JSButtonAction;
75+
return { type: ButtonActionType.JS, file: '', args: {} } satisfies JSButtonAction;
7676
} else if (type === ButtonActionType.INPUT) {
7777
return { type: ButtonActionType.INPUT, str: '' } satisfies InputButtonAction;
7878
} else if (type === ButtonActionType.SLEEP) {

packages/obsidian/src/main.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,20 @@ export default class MetaBindPlugin extends Plugin implements IPlugin {
329329
async saveSettings(): Promise<void> {
330330
console.log(`meta-bind | Main >> settings save`);
331331

332-
// update all the things
332+
this.updateInternalSettings();
333+
334+
await this.saveData(this.settings);
335+
}
336+
337+
updateInternalSettings(): void {
333338
DateParser.dateFormat = this.settings.preferredDateFormat;
334339
setFirstWeekday(this.settings.firstWeekday);
335340

336-
await this.saveData(this.settings);
341+
this.loadTemplates();
342+
}
343+
344+
async onExternalSettingsChange(): Promise<void> {
345+
await this.loadSettings();
337346
}
338347

339348
// TODO: move to internal API

0 commit comments

Comments
 (0)